You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by si...@insession.com on 2005/07/11 14:18:36 UTC

startup scripts for Geronimo - will users want to prepend their own classpath?

I am working on the startup scripts for Geronimo and was wondering whether 
people can see a requirement now or in the future where users would want 
to be able to specify their own classpath when executing the startup 
script (e.g. in the CLASSPATH env var) and have that appended to the 
server's classpath (currently the server's classpath is set in the 
Class-Path manifest attribute of the geronimo/bin/server.jar file)?

--> Note that we cannot use the -cp and -jar options at the same time due 
to Bug parade bug 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4459663

If this is a requirement, here is a proposal (untested) on how we could 
implement it:

The startup script when issuing the java command would:
* not use the -jar option.  It would construct the full classpath, 
including the classpath the user specified followed by the server's 
classpath and specify it on the -cp option.
* obtain the server's part of the classpath by executing a .bat or .sh 
file that was written by the assembly, since the assembly knows this as it 
sets the classpath in the JAR manifest.
* specify the main class on the java command ( 
org.apache.geronimo.system.main.Daemon )
* specify the endorsed dir ( lib/endorsed )

(FYI.. Tomcat startup scripts do not use the -jar option and allow users 
to set the classpath).

Anyone have any opinions or ideas?

Thanks,

John

This e-mail message and any attachments may contain confidential, 
proprietary or non-public information.  This information is intended 
solely for the designated recipient(s).  If an addressing or transmission 
error has misdirected this e-mail, please notify the sender immediately 
and destroy this e-mail.  Any review, dissemination, use or reliance upon 
this information by unintended recipients is prohibited.  Any opinions 
expressed in this e-mail are those of the author personally.

Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Dain Sundstrom <da...@iq80.com>.
You don't need to specify a full class path since the server and  
deployer jars contain a manifest class path.  The following commands  
are equivalent:

$ java -jar bin/server.jar

$ java -classpath bin/server.jar org.apache.geronimo.system.main.Daemon

-dain

On Jul 11, 2005, at 5:18 AM, sissonj@insession.com wrote:

> I am working on the startup scripts for Geronimo and was wondering  
> whether
> people can see a requirement now or in the future where users would  
> want
> to be able to specify their own classpath when executing the startup
> script (e.g. in the CLASSPATH env var) and have that appended to the
> server's classpath (currently the server's classpath is set in the
> Class-Path manifest attribute of the geronimo/bin/server.jar file)?
>
> --> Note that we cannot use the -cp and -jar options at the same  
> time due
> to Bug parade bug
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4459663
>
> If this is a requirement, here is a proposal (untested) on how we  
> could
> implement it:
>
> The startup script when issuing the java command would:
> * not use the -jar option.  It would construct the full classpath,
> including the classpath the user specified followed by the server's
> classpath and specify it on the -cp option.
> * obtain the server's part of the classpath by executing a .bat or .sh
> file that was written by the assembly, since the assembly knows  
> this as it
> sets the classpath in the JAR manifest.
> * specify the main class on the java command (
> org.apache.geronimo.system.main.Daemon )
> * specify the endorsed dir ( lib/endorsed )
>
> (FYI.. Tomcat startup scripts do not use the -jar option and allow  
> users
> to set the classpath).
>
> Anyone have any opinions or ideas?
>
> Thanks,
>
> John
>
> This e-mail message and any attachments may contain confidential,
> proprietary or non-public information.  This information is intended
> solely for the designated recipient(s).  If an addressing or  
> transmission
> error has misdirected this e-mail, please notify the sender  
> immediately
> and destroy this e-mail.  Any review, dissemination, use or  
> reliance upon
> this information by unintended recipients is prohibited.  Any opinions
> expressed in this e-mail are those of the author personally.
>


Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jeff Genender <jg...@savoirtech.com>.
So will I need to rebuild an assembly when I add a jar ...and in the 
order I need the jar to be accessed?

Jacek Laskowski wrote:
> Jeff Genender wrote:
> 
>> This is common. 
> 
> 
> Well, it's common on other platforms, but quite contrary to the way 
> Geronimo handles jars. If a configuration needs jars they should be its 
> own dependencies specified in a plan.
> 
>> Jeff
> 
> 
> Jacek

Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jacek Laskowski <jl...@apache.org>.
Jeff Genender wrote:

> This is common. 

Well, it's common on other platforms, but quite contrary to the way 
Geronimo handles jars. If a configuration needs jars they should be its 
own dependencies specified in a plan.

> Jeff

Jacek


Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jeff Genender <jg...@savoirtech.com>.
Jacek Laskowski wrote:
> sissonj@insession.com wrote:
> 
>> I am working on the startup scripts for Geronimo and was wondering 
>> whether people can see a requirement now or in the future where users 
>> would want to be able to specify their own classpath when executing 
>> the startup script (e.g. in the CLASSPATH env var) and have that 
>> appended to the server's classpath (currently the server's classpath 
>> is set in the Class-Path manifest attribute of the 
>> geronimo/bin/server.jar file)?
> 
> 
> Why would they want to specify the classpath? Do you envision its use? I 
> don't see a reason yet, but since it's a shell script, it won't hurt to 
> have a way to specify it (altough I think it will become an unuseable 
> feature).

This is common.  The CLASSPATH alteration can have a number of uses, one 
of which is the ability to patch included jars by overriding packages. 
This technique is also used to do service paks without having to 
redistribute the entire build...this is an old Weblogic trick.


> 
>> John
> 
> 
> Jacek

Jeff

Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jacek Laskowski <jl...@apache.org>.
sissonj@insession.com wrote:
> I am working on the startup scripts for Geronimo and was wondering whether 
> people can see a requirement now or in the future where users would want 
> to be able to specify their own classpath when executing the startup 
> script (e.g. in the CLASSPATH env var) and have that appended to the 
> server's classpath (currently the server's classpath is set in the 
> Class-Path manifest attribute of the geronimo/bin/server.jar file)?

Why would they want to specify the classpath? Do you envision its use? I 
don't see a reason yet, but since it's a shell script, it won't hurt to 
have a way to specify it (altough I think it will become an unuseable 
feature).

> John

Jacek


Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jacek Laskowski <jl...@apache.org>.
Aaron Mulder wrote:
> 	Most often it seems the CLASSPATH is used to add JDBC drivers or 
> common 3rd party libraries.  We have special facilities for that in 
> Geronimo, so I don't see that being able to set the CLASSPATH is all that 
> valuable.

Exactly. That was the reason why I was asking. Unless I'm mistaken, in 
Geronimo there's no value in setting up the CLASSPATH as it's handled by 
  GBean dependencies. If one wants to share some libraries to two or 
more configurations it's achieved by establishing a common parent 
configuration that only holds the common jars.

> Aaron

Jacek


Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jeff Genender <jg...@savoirtech.com>.
That was my understanding as well.  I really think we need the ability 
to allow folks to set a CLASSPATH without the need to rebuild a config. 
  What do you think?

Jeff

Dain Sundstrom wrote:
> Geronimo only reads compiled configurations so if you want to change  it 
> you need to rebuild the configuration.
> 
> -dain
> 
> On Jul 11, 2005, at 8:08 AM, Jeff Genender wrote:
> 
>> Cool.  Do I need to build an assembly though? (Sorry for the repost)
>>
>> Dain Sundstrom wrote:
>>
>>> Jars are loaded in the order they appear in the xml file.
>>> -dain
>>> On Jul 11, 2005, at 8:02 AM, Jeff Genender wrote:
>>>
>>>> Can I set the order of which jars will get loaded first?
>>>>
>>>> Aaron Mulder wrote:
>>>>
>>>>
>>>>>     Most often it seems the CLASSPATH is used to add JDBC  drivers  
>>>>> or common 3rd party libraries.  We have special  facilities for  
>>>>> that in Geronimo, so I don't see that being able  to set the  
>>>>> CLASSPATH is all that valuable.
>>>>> Aaron
>>>>> On Mon, 11 Jul 2005 sissonj@insession.com wrote:
>>>>>
>>>>>
>>>>>> I am working on the startup scripts for Geronimo and was   
>>>>>> wondering whether people can see a requirement now or in the   
>>>>>> future where users would want to be able to specify their own   
>>>>>> classpath when executing the startup script (e.g. in the   
>>>>>> CLASSPATH env var) and have that appended to the server's   
>>>>>> classpath (currently the server's classpath is set in the  Class- 
>>>>>> Path manifest attribute of the geronimo/bin/server.jar  file)?
>>>>>>
>>>>>> --> Note that we cannot use the -cp and -jar options at the  same  
>>>>>> time due to Bug parade bug http://bugs.sun.com/ bugdatabase/ 
>>>>>> view_bug.do?bug_id=4459663
>>>>>>
>>>>>> If this is a requirement, here is a proposal (untested) on how  
>>>>>> we  could implement it:
>>>>>>
>>>>>> The startup script when issuing the java command would:
>>>>>> * not use the -jar option.  It would construct the full   
>>>>>> classpath, including the classpath the user specified followed  
>>>>>> by  the server's classpath and specify it on the -cp option.
>>>>>> * obtain the server's part of the classpath by executing  a .bat  
>>>>>> or .sh file that was written by the assembly, since the  assembly  
>>>>>> knows this as it sets the classpath in the JAR manifest.
>>>>>> * specify the main class on the java command   ( 
>>>>>> org.apache.geronimo.system.main.Daemon )
>>>>>> * specify the endorsed dir ( lib/endorsed )
>>>>>>
>>>>>> (FYI.. Tomcat startup scripts do not use the -jar option and   
>>>>>> allow users to set the classpath).
>>>>>>
>>>>>> Anyone have any opinions or ideas?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> John
>>>>>>
>>>>>> This e-mail message and any attachments may contain  
>>>>>> confidential,  proprietary or non-public information.  This  
>>>>>> information is  intended solely for the designated recipient (s).  
>>>>>> If an  addressing or transmission error has misdirected  this 
>>>>>> e-mail,  please notify the sender immediately and destroy  this 
>>>>>> e-mail.   Any review, dissemination, use or reliance upon  this 
>>>>>> information  by unintended recipients is prohibited.  Any  
>>>>>> opinions expressed  in this e-mail are those of the author  
>>>>>> personally.
>>>>>>
>>>>>>
>>>>
>>

Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Dain Sundstrom <da...@iq80.com>.
Geronimo only reads compiled configurations so if you want to change  
it you need to rebuild the configuration.

-dain

On Jul 11, 2005, at 8:08 AM, Jeff Genender wrote:

> Cool.  Do I need to build an assembly though? (Sorry for the repost)
>
> Dain Sundstrom wrote:
>
>> Jars are loaded in the order they appear in the xml file.
>> -dain
>> On Jul 11, 2005, at 8:02 AM, Jeff Genender wrote:
>>
>>> Can I set the order of which jars will get loaded first?
>>>
>>> Aaron Mulder wrote:
>>>
>>>
>>>>     Most often it seems the CLASSPATH is used to add JDBC  
>>>> drivers  or common 3rd party libraries.  We have special  
>>>> facilities for  that in Geronimo, so I don't see that being able  
>>>> to set the  CLASSPATH is all that valuable.
>>>> Aaron
>>>> On Mon, 11 Jul 2005 sissonj@insession.com wrote:
>>>>
>>>>
>>>>> I am working on the startup scripts for Geronimo and was   
>>>>> wondering whether people can see a requirement now or in the   
>>>>> future where users would want to be able to specify their own   
>>>>> classpath when executing the startup script (e.g. in the   
>>>>> CLASSPATH env var) and have that appended to the server's   
>>>>> classpath (currently the server's classpath is set in the  
>>>>> Class- Path manifest attribute of the geronimo/bin/server.jar  
>>>>> file)?
>>>>>
>>>>> --> Note that we cannot use the -cp and -jar options at the  
>>>>> same  time due to Bug parade bug http://bugs.sun.com/ 
>>>>> bugdatabase/ view_bug.do?bug_id=4459663
>>>>>
>>>>> If this is a requirement, here is a proposal (untested) on how  
>>>>> we  could implement it:
>>>>>
>>>>> The startup script when issuing the java command would:
>>>>> * not use the -jar option.  It would construct the full   
>>>>> classpath, including the classpath the user specified followed  
>>>>> by  the server's classpath and specify it on the -cp option.
>>>>> * obtain the server's part of the classpath by executing  
>>>>> a .bat  or .sh file that was written by the assembly, since the  
>>>>> assembly  knows this as it sets the classpath in the JAR manifest.
>>>>> * specify the main class on the java command   
>>>>> ( org.apache.geronimo.system.main.Daemon )
>>>>> * specify the endorsed dir ( lib/endorsed )
>>>>>
>>>>> (FYI.. Tomcat startup scripts do not use the -jar option and   
>>>>> allow users to set the classpath).
>>>>>
>>>>> Anyone have any opinions or ideas?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> John
>>>>>
>>>>> This e-mail message and any attachments may contain  
>>>>> confidential,  proprietary or non-public information.  This  
>>>>> information is  intended solely for the designated recipient 
>>>>> (s).  If an  addressing or transmission error has misdirected  
>>>>> this e-mail,  please notify the sender immediately and destroy  
>>>>> this e-mail.   Any review, dissemination, use or reliance upon  
>>>>> this information  by unintended recipients is prohibited.  Any  
>>>>> opinions expressed  in this e-mail are those of the author  
>>>>> personally.
>>>>>
>>>>>
>>>
>


Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jeff Genender <jg...@savoirtech.com>.
Cool.  Do I need to build an assembly though? (Sorry for the repost)

Dain Sundstrom wrote:
> Jars are loaded in the order they appear in the xml file.
> 
> -dain
> 
> On Jul 11, 2005, at 8:02 AM, Jeff Genender wrote:
> 
>> Can I set the order of which jars will get loaded first?
>>
>> Aaron Mulder wrote:
>>
>>>     Most often it seems the CLASSPATH is used to add JDBC drivers  or 
>>> common 3rd party libraries.  We have special facilities for  that in 
>>> Geronimo, so I don't see that being able to set the  CLASSPATH is all 
>>> that valuable.
>>> Aaron
>>> On Mon, 11 Jul 2005 sissonj@insession.com wrote:
>>>
>>>> I am working on the startup scripts for Geronimo and was  wondering 
>>>> whether people can see a requirement now or in the  future where 
>>>> users would want to be able to specify their own  classpath when 
>>>> executing the startup script (e.g. in the  CLASSPATH env var) and 
>>>> have that appended to the server's  classpath (currently the 
>>>> server's classpath is set in the Class- Path manifest attribute of 
>>>> the geronimo/bin/server.jar file)?
>>>>
>>>> --> Note that we cannot use the -cp and -jar options at the same  
>>>> time due to Bug parade bug http://bugs.sun.com/bugdatabase/ 
>>>> view_bug.do?bug_id=4459663
>>>>
>>>> If this is a requirement, here is a proposal (untested) on how we  
>>>> could implement it:
>>>>
>>>> The startup script when issuing the java command would:
>>>> * not use the -jar option.  It would construct the full  classpath, 
>>>> including the classpath the user specified followed by  the server's 
>>>> classpath and specify it on the -cp option.
>>>> * obtain the server's part of the classpath by executing a .bat  or 
>>>> .sh file that was written by the assembly, since the assembly  knows 
>>>> this as it sets the classpath in the JAR manifest.
>>>> * specify the main class on the java command  ( 
>>>> org.apache.geronimo.system.main.Daemon )
>>>> * specify the endorsed dir ( lib/endorsed )
>>>>
>>>> (FYI.. Tomcat startup scripts do not use the -jar option and  allow 
>>>> users to set the classpath).
>>>>
>>>> Anyone have any opinions or ideas?
>>>>
>>>> Thanks,
>>>>
>>>> John
>>>>
>>>> This e-mail message and any attachments may contain confidential,  
>>>> proprietary or non-public information.  This information is  
>>>> intended solely for the designated recipient(s).  If an  addressing 
>>>> or transmission error has misdirected this e-mail,  please notify 
>>>> the sender immediately and destroy this e-mail.   Any review, 
>>>> dissemination, use or reliance upon this information  by unintended 
>>>> recipients is prohibited.  Any opinions expressed  in this e-mail 
>>>> are those of the author personally.
>>>>
>>

Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Dain Sundstrom <da...@iq80.com>.
Jars are loaded in the order they appear in the xml file.

-dain

On Jul 11, 2005, at 8:02 AM, Jeff Genender wrote:

> Can I set the order of which jars will get loaded first?
>
> Aaron Mulder wrote:
>
>>     Most often it seems the CLASSPATH is used to add JDBC drivers  
>> or common 3rd party libraries.  We have special facilities for  
>> that in Geronimo, so I don't see that being able to set the  
>> CLASSPATH is all that valuable.
>> Aaron
>> On Mon, 11 Jul 2005 sissonj@insession.com wrote:
>>
>>> I am working on the startup scripts for Geronimo and was  
>>> wondering whether people can see a requirement now or in the  
>>> future where users would want to be able to specify their own  
>>> classpath when executing the startup script (e.g. in the  
>>> CLASSPATH env var) and have that appended to the server's  
>>> classpath (currently the server's classpath is set in the Class- 
>>> Path manifest attribute of the geronimo/bin/server.jar file)?
>>>
>>> --> Note that we cannot use the -cp and -jar options at the same  
>>> time due to Bug parade bug http://bugs.sun.com/bugdatabase/ 
>>> view_bug.do?bug_id=4459663
>>>
>>> If this is a requirement, here is a proposal (untested) on how we  
>>> could implement it:
>>>
>>> The startup script when issuing the java command would:
>>> * not use the -jar option.  It would construct the full  
>>> classpath, including the classpath the user specified followed by  
>>> the server's classpath and specify it on the -cp option.
>>> * obtain the server's part of the classpath by executing a .bat  
>>> or .sh file that was written by the assembly, since the assembly  
>>> knows this as it sets the classpath in the JAR manifest.
>>> * specify the main class on the java command  
>>> ( org.apache.geronimo.system.main.Daemon )
>>> * specify the endorsed dir ( lib/endorsed )
>>>
>>> (FYI.. Tomcat startup scripts do not use the -jar option and  
>>> allow users to set the classpath).
>>>
>>> Anyone have any opinions or ideas?
>>>
>>> Thanks,
>>>
>>> John
>>>
>>> This e-mail message and any attachments may contain confidential,  
>>> proprietary or non-public information.  This information is  
>>> intended solely for the designated recipient(s).  If an  
>>> addressing or transmission error has misdirected this e-mail,  
>>> please notify the sender immediately and destroy this e-mail.   
>>> Any review, dissemination, use or reliance upon this information  
>>> by unintended recipients is prohibited.  Any opinions expressed  
>>> in this e-mail are those of the author personally.
>>>
>


Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Jeff Genender <jg...@savoirtech.com>.
Can I set the order of which jars will get loaded first?

Aaron Mulder wrote:
> 	Most often it seems the CLASSPATH is used to add JDBC drivers or 
> common 3rd party libraries.  We have special facilities for that in 
> Geronimo, so I don't see that being able to set the CLASSPATH is all that 
> valuable.
> 
> Aaron
> 
> On Mon, 11 Jul 2005 sissonj@insession.com wrote:
> 
>>I am working on the startup scripts for Geronimo and was wondering whether 
>>people can see a requirement now or in the future where users would want 
>>to be able to specify their own classpath when executing the startup 
>>script (e.g. in the CLASSPATH env var) and have that appended to the 
>>server's classpath (currently the server's classpath is set in the 
>>Class-Path manifest attribute of the geronimo/bin/server.jar file)?
>>
>>--> Note that we cannot use the -cp and -jar options at the same time due 
>>to Bug parade bug 
>>http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4459663
>>
>>If this is a requirement, here is a proposal (untested) on how we could 
>>implement it:
>>
>>The startup script when issuing the java command would:
>>* not use the -jar option.  It would construct the full classpath, 
>>including the classpath the user specified followed by the server's 
>>classpath and specify it on the -cp option.
>>* obtain the server's part of the classpath by executing a .bat or .sh 
>>file that was written by the assembly, since the assembly knows this as it 
>>sets the classpath in the JAR manifest.
>>* specify the main class on the java command ( 
>>org.apache.geronimo.system.main.Daemon )
>>* specify the endorsed dir ( lib/endorsed )
>>
>>(FYI.. Tomcat startup scripts do not use the -jar option and allow users 
>>to set the classpath).
>>
>>Anyone have any opinions or ideas?
>>
>>Thanks,
>>
>>John
>>
>>This e-mail message and any attachments may contain confidential, 
>>proprietary or non-public information.  This information is intended 
>>solely for the designated recipient(s).  If an addressing or transmission 
>>error has misdirected this e-mail, please notify the sender immediately 
>>and destroy this e-mail.  Any review, dissemination, use or reliance upon 
>>this information by unintended recipients is prohibited.  Any opinions 
>>expressed in this e-mail are those of the author personally.
>>

Re: startup scripts for Geronimo - will users want to prepend their own classpath?

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
	Most often it seems the CLASSPATH is used to add JDBC drivers or 
common 3rd party libraries.  We have special facilities for that in 
Geronimo, so I don't see that being able to set the CLASSPATH is all that 
valuable.

Aaron

On Mon, 11 Jul 2005 sissonj@insession.com wrote:
> I am working on the startup scripts for Geronimo and was wondering whether 
> people can see a requirement now or in the future where users would want 
> to be able to specify their own classpath when executing the startup 
> script (e.g. in the CLASSPATH env var) and have that appended to the 
> server's classpath (currently the server's classpath is set in the 
> Class-Path manifest attribute of the geronimo/bin/server.jar file)?
> 
> --> Note that we cannot use the -cp and -jar options at the same time due 
> to Bug parade bug 
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4459663
> 
> If this is a requirement, here is a proposal (untested) on how we could 
> implement it:
> 
> The startup script when issuing the java command would:
> * not use the -jar option.  It would construct the full classpath, 
> including the classpath the user specified followed by the server's 
> classpath and specify it on the -cp option.
> * obtain the server's part of the classpath by executing a .bat or .sh 
> file that was written by the assembly, since the assembly knows this as it 
> sets the classpath in the JAR manifest.
> * specify the main class on the java command ( 
> org.apache.geronimo.system.main.Daemon )
> * specify the endorsed dir ( lib/endorsed )
> 
> (FYI.. Tomcat startup scripts do not use the -jar option and allow users 
> to set the classpath).
> 
> Anyone have any opinions or ideas?
> 
> Thanks,
> 
> John
> 
> This e-mail message and any attachments may contain confidential, 
> proprietary or non-public information.  This information is intended 
> solely for the designated recipient(s).  If an addressing or transmission 
> error has misdirected this e-mail, please notify the sender immediately 
> and destroy this e-mail.  Any review, dissemination, use or reliance upon 
> this information by unintended recipients is prohibited.  Any opinions 
> expressed in this e-mail are those of the author personally.
>