1

I want to know if there is any way a resource in weblogic can have multiple JNDI names?

My problem is that I have 2 versions of the app deployed on the same weblogic managed server (version A and B). Now, I want to repoint all the clients using version A (using jndi: java:comp/env/A) to version B (using jndi: java:comp/env/B) without the clients have to do anything. Clients use T3 connection to connect. Here the assumption is that the clients can point to version B without any code change (only point to the new apps jndi i.e. java:comp/env/B).

As of now all the clients update the JNDI names to the new version name and do a restart to repoint to my apps new version. I want to prevent this effort.

I think if I can make version A JNDI to also point to version B of app (so there are 2 jndi's java:comp/env/A and java:comp/env/B pointing to same EJB in version B), the clients will start pointing to version B.

So, if there is a way to add multiple JNDIs to a resource I should be good. If you have any other idea this can be acheieved, please let me know.

Bo Persson
  • 90,663
  • 31
  • 146
  • 203
kira
  • 97
  • 1
  • 11

1 Answers1

1

You would have to deploy the same EJB class with a different JNDI name - thus there will be 2 running deployments of the EJB with 2 different JNDI names.

I think this is a bad idea - I dont see why the JNDI name has to change from A to B in the first place?

Clients are using EJB A with JNDI A , you now have the different EJB version called B. Can't you just change the JNDI A to point to EJB B?

JoseK
  • 31,141
  • 14
  • 104
  • 131
  • I plan to undeploy version A later on. So only version B will be available. Some clients need changes in version B, they would be changing to use the jndi for version B. But clients of version A do not need those changes. If I can make jndi of version A point to version B EJB. There will be no need to change anything for such clients. – kira Sep 02 '11 at 10:23
  • @amit: so actually you need to keep running A and B in parallel. Okay - the method I mentiond should work. – JoseK Sep 02 '11 at 11:12
  • I need to keep A and B to run in parallel till all clients point to B. Once they are repointed, I will uninstall version A. Both the JNDI's would point to version B of the applicaiton. Similarly tomorrow there might be version C, D, etc. I just need a method where I can control the repoint of my clients. Unless they have some change needed to use the new version, I dont want them to do anything. I want to direct them to newer version myself in that case. – kira Sep 05 '11 at 13:11