geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <dsundst...@gluecode.com>
Subject Re: ServerInfo
Date Thu, 06 Jan 2005 21:20:22 GMT
Doh!

I'll re-enable that line of code, but I think we still need to think  
about this issue.  The problem is create by this scenario:

* boot geronimo
* ServerInfo determines the root directory using this (note the  
constructor arg is the persistent value)

     public ServerInfo(String baseDirectory) throws Exception {
         baseDirectory = System.getProperty("geronimo.base.dir",  
baseDirectory);
         // snip
         System.setProperty("geronimo.base.dir", base.getAbsolutePath());
    }

* Shutdown the server
* boot another geronimo server in the same vm instance
* this time when server info evalutes the system property it will be  
set, which means that it is not possible to run a second geronimo  
server in the same vm *and* having a different geronimo.base.dir.

Anyone got an idea on how to fix this?

-dain

--
Dain Sundstrom
Chief Architect
Gluecode Software
310.536.8355, ext. 26

On Jan 6, 2005, at 12:57 PM, Mark wrote:

> Yep.  :-)
>
> Mark
>
> Alan D. Cabrera wrote:
>
>>
>>> -----Original Message-----
>>> From: Mark [mailto:delafran_j2ee@hotmail.com]
>>> Sent: Thursday, January 06, 2005 3:52 PM
>>> To: dev@geronimo.apache.org
>>> Subject: ServerInfo
>>>
>>> Looking at the recent checkin for ServerInfo.java
>>>
>>> Revision *124261* </viewcvs.cgi?rev=124261&view=rev> - (view
>>>
>>>
>> </viewcvs.cgi/geronimo/trunk/modules/system/src/java/org/apache/ 
>> geronimo
>> /s
>>
>>> ystem/serverinfo/ServerInfo.java?rev=124261&view=markup>)
>>> (download
>>>
>>>
>> </viewcvs.cgi/*checkout*/geronimo/trunk/modules/system/src/java/org/ 
>> apac
>> he
>>
>>> /geronimo/system/serverinfo/ServerInfo.java?rev=124261>)
>>> - *[selected]*
>>> Modified /Wed Jan 5 19:56:08 2005 UTC/ (24 hours, 43 minutes ago) by
>>> /dain/
>>> File length: 5373 byte(s)
>>> Diff to previous 123908
>>>
>>>
>> </viewcvs.cgi/geronimo/trunk/modules/system/src/java/org/apache/ 
>> geronimo
>> /s
>>
>>> ystem/serverinfo/ServerInfo.java?rev=124261&r1=123908&r2=124261>
>>> (colored
>>>
>>>
>> </viewcvs.cgi/geronimo/trunk/modules/system/src/java/org/apache/ 
>> geronimo
>> /s
>>
>> ystem/serverinfo/ServerInfo.java? 
>> rev=124261&r1=123908&r2=124261&diff_for
>> ma
>>
>>> t=h>)
>>>
>>>
>>> Commented out test using listRoots as it doesn't work on windows
>>>
>> computers
>>
>>> cotaining a floppy drive a:.
>>> Removed setting of geronimo.base.dir system property as it stops the
>>> ability to start two server info
>>> objects in the same vm (even if they are started one after the  
>>> other).
>>> Also no one was getting the property anyway.
>>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>>
>>> It is being used by the log4j configuration files:
>>>
>>> see var/log/server-log4j.properties:
>>>
>>> log4j.appender.FILE.file=${geronimo.base.dir}/var/log/geronimo.log
>>>
>>> I would think that if the multiple server info objects all have the
>>>
>> same
>>
>>> base.dir then the system property should be ok.  If the multiple
>>>
>> server
>>
>>> info objects are designed to allow descriptions of servers with
>>>
>> different
>>
>>> base.dirs then we need a way to configure two different log4j server
>>>
>> logs.
>>
>>> If the servers are named then server info could set a named base.dir
>>>
>> which
>>
>>> could then be used by log4j.
>>>
>>
>> Heh heh, this is why, when I start up my server, I get the error:
>>
>> og4j:ERROR setFile(null,true) call failed.
>> ava.io.FileNotFoundException: \var\log\geronimo.log (The system cannot
>> find the path specified)
>>       at java.io.FileOutputStream.openAppend(Native Method)
>>       at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
>>       at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
>>       at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
>>       at
>> org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java: 
>> 15
>> 6)
>>       at
>> org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
>>       at
>> org.apache.log4j.config.PropertySetter.activate(PropertySetter.java: 
>> 247)
>>       at
>> org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.ja 
>> va
>> :123)
>>       at
>> org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.ja 
>> va
>> :87)
>>       at
>> org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurat 
>> or
>> .java:645)
>>       at
>> org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurat 
>> or
>> .java:603)
>>       at
>> org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyCo 
>> nf
>> igurator.java:500)
>>       at
>> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator 
>> .j
>> ava:406)
>>       at
>> org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator 
>> .j
>> ava:432)
>>       at
>> org.apache.geronimo.system.logging.log4j.URLConfigurator.doConfigure(U 
>> RL
>> Configurator.java:117)
>>       at
>> org.apache.geronimo.system.logging.log4j.URLConfigurator.configure(URL 
>> Co
>> nfigurator.java:44)
>>       at
>> org.apache.geronimo.system.logging.log4j.Log4jService.reconfigure(Log4 
>> jS
>> ervice.java:306)
>>       at
>> org.apache.geronimo.system.logging.log4j.Log4jService.doStart(Log4jSer 
>> vi
>> ce.java:352)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstance$GBeanLifecycleCallback 
>> .d
>> oStart(GBeanInstance.java:790)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
>> GB
>> eanInstanceState.java:318)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstan 
>> ce
>> State.java:113)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.start(GBeanInstance.ja 
>> va
>> :461)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanSingleReference.attemptFullStar 
>> t(
>> GBeanSingleReference.java:140)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanSingleReference.targetAdded(GBe 
>> an
>> SingleReference.java:115)
>>       at
>> org.apache.geronimo.gbean.runtime.AbstractGBeanReference$1.running(Abs 
>> tr
>> actGBeanReference.java:145)
>>       at
>> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.fireRunning 
>> Ev
>> ent(BasicLifecycleMonitor.java:153)
>>       at
>> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor.access$300( 
>> Ba
>> sicLifecycleMonitor.java:36)
>>       at
>> org.apache.geronimo.kernel.lifecycle.BasicLifecycleMonitor$RawLifecycl 
>> eB
>> roadcaster.fireRunningEvent(BasicLifecycleMonitor.java:229)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.stateChanged(GBea 
>> nI
>> nstanceState.java:521)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart( 
>> GB
>> eanInstanceState.java:337)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(GBeanInstan 
>> ce
>> State.java:113)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GB 
>> ea
>> nInstanceState.java:135)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIn 
>> st
>> ance.java:475)
>>       at
>> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:342)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(GB 
>> ea
>> nInstanceState.java:143)
>>       at
>> org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(GBeanIn 
>> st
>> ance.java:475)
>>       at
>> org.apache.geronimo.kernel.Kernel.startRecursiveGBean(Kernel.java:342)
>>       at org.apache.geronimo.system.main.Daemon.main(Daemon.java:125)
>>
>>
>> .
>>
>>


Mime
View raw message