I have two enterprise applications that I am going to be deploying to GlassFish. The first application(A) has several EJB's that are exposed as WebServices. The second application(B) consumes several of the exposed services. So what is the best way to handle the inter-application communication?
If I expose application A EJB's as remote interfaces then application B can consume them that way, and to do so I would need to distribute a client jar that contains the interfaces.
If I have application B consume the WebServices then I would need to generate the client stubs and bundle them within application B. But the issue I have with this is that application B must know the URL of the WebServices prior to deployment time and embed that URL into the application somehow. This would mean that there would be different builds depending upon the deployment environment. (DEV, TEST, PROD) - not attractive. I could always define the WebService URL's in JNDI and then application B could retrieve them and bind them at runtime. - (good, but I need to provide an ObjectFactory to GlassFish so I can bind the URL's in JNDI)
How do others do it? Are there any other alternatives that I should be considering?
Thanks for the help....
[Message sent by forum member 'cmathrusse' (cmathrusse)]
http://forums.java.net/jive/thread.jspa?messageID=289475