On Sep 18, 2007, at 4:13 PM, Karan Malhi wrote:
Questions:
- Can I set the jndi name at the bean level?
The reason I ask this is because of this scenario:
Organisation X decides to set the JNDI name format to
{deploymentId}{interfaceType.annotationName} at the EJB-JAR level.
They create around 20 EJB's and then decide to change the format to
lets say {moduleId}{deploymentId}{interfaceType.annotationName} for
all future EJB's. But they already have clients which lookup EJB's
using the {deploymentId}{interfaceType.annotationName} format and do
not want to break those clients (to keep backward compatibility).
How would somebody achieve the above with newer beans being added to
an existing ejb-jar?
- Can I set the jndi name explicitly without specifying the format?
i.e. is there a place where I can say that EJB FooBean has a JNDI name
of ejb/LosAngeles/CA/USA instead of using a combination of pre-defined
variables in the JndiBuilder.getName() method.
So far we don't yet have the ability to set the jndi name for an
individual interface of a bean. For an individual interface meaning,
EJBHome, EJBLocalHome, Business Local Interface A, Business Local
Interface B, Business Remote Interface C, Business Remote Interface D.
You can explicitly set the deployment id, which can get you pretty
close. Definitely something we need to add at some point.
-David
On 9/16/07, David Blevins <[EMAIL PROTECTED]> wrote:
On Sep 15, 2007, at 10:08 PM, Karan Malhi wrote:
David,
I saw that you committed the change to the default JNDI name format.
Will be updating the wiki
(http://cwiki.apache.org/confluence/display/OPENEJB/JNDI+Names) with
the new information. Will be requesting you to verify the docs
after I
do the update.
Fantastic! You the one, Karan ;) (easier to rhyme now that I know
how to pronounce your name :)
That first explanation at the top is too long. If you can think of
another way to express the default, go for it.
However you want you JNDI layout to be, you should be able to
get it
and you can set it at either a server or ejb-jar level depending on
how much consistency you want.
Okay, so setting the format at the server level is done through the
properties you mentioned. How would I set the format at the ejb-jar
level?
In a META-INF/openejb-jar.xml like this:
<openejb-jar>
<properties>
openejb.deploymentId.format = {ejbName}
openejb.jndiname.format = {deploymentId}
{interfaceType.annotationName}
</properties>
</openejb-jar>
-David
--
Karan Singh Malhi