-
1. Re: JNDI and versioning
raja05 May 3, 2003 6:27 PM (in response to pants)The JNDI Names are on a server level. You MUST have different names for the ejbs if u are deploying them to the same server.
-Raj -
2. Re: JNDI and versioning
pants May 6, 2003 2:00 AM (in response to pants)Yeah I realise that, what I was wondering was if applying version numbers to JNDI names was common/good practice.
So the JNDI name for an EJB...
/some/path/to/my/EJB
becomes
/some/path/to/my/EJB.1
/some/path/to/my/EJB.2
/some/path/to/my/EJB.3
etc...
Any comments/suggestions? -
3. Re: JNDI and versioning
jonlee May 6, 2003 2:15 AM (in response to pants)It is not a very common thing to do - at least not with complex applications with many components. Apart from having to change descriptors and references in other components calling your service, it becomes a bit of a maintenance nightmare working out what broke, what version you were calling and the rest.
However, there are cases where it might be useful but I'm having trouble picturing it. ;) -
4. Re: JNDI and versioning
raja05 May 6, 2003 1:28 PM (in response to pants)Actually what we do here in my project is let Ant take care of that mess.
We have an XML template which has a reference tag(for e.g. @type@) embedded in the XML
When we build it, we copy it to another XML and use the ant replace to replace all @type@ to say "ver1" . so all my jndi names become
com.blah.blah.ejb1.ver1
com.blah.blah.ejb2.ver1
and whenver we go to another deployment for another app, just change ver1 to ver2 and ant takes care of building it. -
5. Re: JNDI and versioning
juhalindfors May 6, 2003 4:46 PM (in response to pants)I use different subcontexts myself, rather than change the name the object is bound under -- but I guess the difference is minimal.