dev@glassfish.java.net

Re: Wrong ServerEnvironmentImpl properties in embedded mode?

From: Marina Vatkina <Marina.Vatkina_at_Sun.COM>
Date: Thu, 13 Aug 2009 16:46:16 -0700

OK. I know what's wrong, but I don't know why it needs to be that way:

ServerEnvironmentImp.postConstruct() creates a new instance of
ASenvPropertyReader from the startupContext. This class explicitly sets
installDir to the context.root parent:

     public ASenvPropertyReader(StartupContext context) {
         this(context.getRootDirectory().getParentFile());
     }

Can we have a different logic in embedded mode or should the embedded.Server
pass in a subdir as installRoot (instead of fs.instanceRoot) to the new
StartupContext?

thanks,
-marina

Marina Vatkina wrote:
> For a "pure" embedded-all.jar - yes, but how about the one that can work
> with the existing gf installation in no-inplanted (how do you call it
> btw?) mode?
>
> thanks,
> -marina
>
> Jerome Dochez wrote:
>
>> Security and connector team will need to provide a solution for this.
>> It's obvious that when using the embedded-all.jar, there will not be
>> a valid populated installRoot.
>>
>> Jagadish, any suggestion ? In this scenario, glassfish is shipped as
>> a single jar file, and there are no installRoot where to load the
>> adapters from. Would that be enough to shop the adapters in this uber-
>> jar along with the runtime ?
>>
>> Jerome
>>
>> On Aug 13, 2009, at 9:26 AM, Marina Vatkina wrote:
>>
>>> Jerome Dochez wrote:
>>>
>>>> in the case of using the gf-embedded-all,
>>>
>>>
>>>
>>> I saw this error with inplanted mode also, but as it won't work for
>>> embedded EJB container, I switched to use gf-embedded-all to try to
>>> make some progress.
>>>
>>> there is no installRoot since
>>>
>>>> there is no installation so you should get the same installRoot
>>>> and instanceRoot values.
>>>
>>>
>>>
>>> This is not what's happening :(.
>>>
>>> Can you clarify why is this creating an issue down
>>>
>>>> to road ?
>>>
>>>
>>>
>>> keystore.jks and __ds_jdbc_ra can't be found by the code that use
>>> "com.sun.aas.installRoot" property to locate them. Without
>>> __ds_jdbc_ra, connector code can't bootstrap itself.
>>>
>>> thanks,
>>> -marina
>>>
>>>> jerome
>>>> On Aug 12, 2009, at 4:18 PM, Marina Vatkina wrote:
>>>>
>>>>> Jerome,
>>>>>
>>>>> I'm trying the gf-embedded-all.jar for
>>>>> When I try to point to a pre-existing GF installation via
>>>>> <EmbeddedFileSystem.Builder>.setConfigurationFile() for
>>>>> domain.xml and EmbeddedFileSystem.Builder.setInstanceRoot() for
>>>>> <install>/ glassfishv3/glassfish/domains/domain1, the system
>>>>> properties in thServerEnvironmentImpl are getting wrong (?)
>>>>> values from the injected StartupContext ref:
>>>>>
>>>>> com.sun.aas.configRoot <install>/glassfishv3/glassfish/domains/ config
>>>>> com.sun.aas.installRoot <install>/glassfishv3/glassfish/domains
>>>>>
>>>>> If I set instance root to the <install>/glassfishv3/glassfish, or
>>>>> don't set the instance root at all, the problem with calculating
>>>>> the right locations is still the same :(.
>>>>>
>>>>> Everything is (obviously) fine in the non-embedded mode:
>>>>>
>>>>> com.sun.aas.configRoot <install>/glassfishv3/glassfish/config
>>>>> com.sun.aas.installRoot <install>/glassfishv3/glassfish
>>>>>
>>>>> thanks,
>>>>> -marina
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>