users@glassfish.java.net

RE: JNDI resources/cluster nodes

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Fri, 11 May 2007 17:36:52 +1000

Got it all sorted out now, sorry for the noise. The factory class I
implemented gets passed a javax.naming.Reference in the
getObjectInstance() method (obj parameter), and I can interrogate that
for the additional properties I define (via the get("parameterName")
method which returns a RefAddr, and its getContent() method).

The classes aren't referenced until required, so it works nicely in
terms of being able to define the JNDI resource ahead of
time/deployment, and staying within the deployment package (not having
to have separate jars in the GF classpath etc).

Hope that's all relatively within spec and works across various
containers.

Cheers
Joe

> I guess my current line of thinking is to define a custom
> JNDI resource in GF, with a Resoure Type like
> com.mycompany.SomeConfigHolder, and a factory class like
> com.mycompany.SomeConfigFactory, and then define the concrete
> values using the 'Additional Properties' section... not sure
> if this approach makes sense.
>
> If it does, do my classes mentioned above need to be
> available at the time of configuring the custom resource, or
> only when actually referenced (as they'll only be available
> after the app is deployed).

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.