Ok, I'll try to create a patch.

Thank you for your assistance!


From: David Jencks [mailto:[EMAIL PROTECTED]
Sent: Monday, March 13, 2006 9:24 PM
To: [email protected]
Subject: Re: Using non-Sun JNDI/RMI service provider

 

 

On Mar 13, 2006, at 10:06 AM, Pavlenko, Andrey A wrote:



David,

 

Thank you for you advice.

However I don't think the problem can be solved by adding a copy of the NamingProperties gbean to the client-system plan because the name of the initial context factory is hardcoded in the following source:

modules/client/src/java/org/apache/geronimo/client/StaticJndiContextPlugin.java:56:        System.setProperty("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");

Therefore System.setProperty(…) overrides the property specified in the NamingProperties gbean.

 

Yes, I was very unclear.  I was thinking we could remove the hardcoded properties in StaticJndiContextPlugin and instead use a SystemProperties or NamingProperties gbean in one of the client plans.  If you can try this please enter a Jira issue with your results and a patch if it works :-)

 

Many thanks,

david jencks



 


From: David Jencks [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 10, 2006 7:24 PM
To: [email protected]
Subject: Re: Using non-Sun JNDI/RMI service provider

 

 

On Mar 10, 2006, at 7:36 AM, Pavlenko, Andrey A wrote:




Hi all,

 

I want to configure Geronimo to use non-Sun JNDI/RMI service provider.

But as I can see, the name of the initial context factory is hardcoded in the sources so it looks I can't customize it in any way.

Is there a way I can plug my provider, and if not, can we think about how this customization can be implemented?

The following is the list of sources containing hardcoded name of the provider:

 

modules/client/src/java/org/apache/geronimo/client/StaticJndiContextPlugin.java:56:        System.setProperty("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");

modules/naming/src/test/org/apache/geronimo/naming/geronimo/GeronimoRootContextTest.java:33:        System.setProperty("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");

modules/naming/src/test/org/apache/geronimo/naming/java/AbstractContextTest.java:48:        System.setProperty("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");

modules/naming/src/test/org/apache/geronimo/naming/java/ThreadContextTest.java:53:        System.setProperty("java.naming.factory.initial", "com.sun.jndi.rmi.registry.RegistryContextFactory");

modules/system/src/test/org/apache/geronimo/system/properties/NamingPropertiesTest.java:11:    private static final String NAMING_FACTORY_INITIAL = "com.sun.jndi.rmi.registry.RegistryContextFactory";

 

 

I can never keep straight exactly what this setting does :-) Note that all but the first are in tests.  Do you need to change those too or just the  app client setting which is the only one used at runtime?

 

The app client (runtime) use should be easy to eliminate by adding a copy of the NamingProperties gbean from the rmi-naming configuration plan to the client-system plan.  You'd still have to rebuild the configurations to get the new value since at this time we can't override gbean attributes in the first-loaded plan.  We could look into adding another configuration for the app client that included the NamingProperties and SystemProperties gbeans similar to the server rmi-naming configuration: then you could override the properties in a client-config.xml

 

thanks

david jencks

 




 


Thanks

Andrey Pavlenko

Intel Middleware Products Division




 



 

Reply via email to