users@glassfish.java.net

JNDI resources/cluster nodes

From: Shevland, Joe <joe.shevland_at_capgemini.com>
Date: Fri, 11 May 2007 15:26:22 +1000

Hi,

Just wondering if someone could provide a quick sanity check on
something I'm attempting. I want to run up three instances of an EAR in
Glassfish (ultimately load balancing/more throughput), and each one is
going to need slightly different configuration for a service it offers*
so I was thinking of modifying sun-ejb-jar.xml for each.

I was going to add a simple String JNDI resource, say AppParam1, and
have a @Resource(name="AppParam1") annotation in a session bean pointing
to its name. Then in sun-ejb-jar.xml, I'd point 'AppParam1' to the real
JNDI name of, say, 'AppParam1ForNode1' or 'AppParam1ForNode2' etc.

Does this sound OK? If so, in defining the JNDI resource in GF, I don't
really want a factory, or at least I'm after a very basic implementation
of javax.naming.spi.ObjectFactory that just returns the constant value
I'm after... is there a default one for this?

Cheers
Joe

* If instead its clustered, because there's just one deployment ear, how
would I map three 'instances' to three different configurations or
different JNDI names for each? Each module is going to open a server
socket (yes its probably going outside the spec) and I'd like to feed
them each a different port.

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.