Usally in our client program (may be a servlet,JSP,java code), we do a lookup of our beans by specifying the EJB server name/IP address. i.e., first the server is located and then lookup is done.
Now, say for instance, the server changes (name/IP address changes). Doesn't my client program gets affected?
How to overcome this issue? Any suggestions??
Why u not use XML to save this attributes?
If the new Server/IP address has a similar home/remote interface then you need not worry. If the client calls a
remote bean that is not in the second EJB server then you could land into trouble.
**Your JNDI lookup will have to change.
That's the whole purpose of EJB. If you don't like Weblogic you could essentially shelve it and go for JBOSS.
Services executing inside the app server e.g. servlets & JSPs can normally create the InitialContext without providing any parameters. For example:
InitialContext ic = new InitialContext();
This should be portable across servers, it definately works in WebLogic 5.1. Clients executing outside of the app server e.g. a Swing client could specify a jndi.properties file.