-
How to use EJB in distributed environment (4 messages)
- Posted by: Milan Shrestha
- Posted on: June 04 2007 03:10 EDT
Hello Everyone I am new to EJB. I have to use the EJB in a distributed environment. There will be a web server at one system which will access the application server at another system which will be running ejb. I am using JBOss as application server. So I would be thankful if anybody could tell me what are the steps to implement EJB in such a distributed Environment. Thank you Regards MilanThreaded Messages (4)
- Re: How to use EJB in distributed environment by Asiri Liyanage on June 04 2007 05:20 EDT
- thank for your suggestion Asiri by Milan Shrestha on June 05 2007 06:58 EDT
- thank for your suggestion Asiri by Milan Shrestha on June 05 2007 07:27 EDT
- Re: How to use EJB in distributed environment by John Smith on June 08 2007 02:23 EDT
-
Re: How to use EJB in distributed environment[ Go to top ]
- Posted by: Asiri Liyanage
- Posted on: June 04 2007 05:20 EDT
- in response to Milan Shrestha
Hi, According to the information you have given, you are not going to use the application in a distributing environment. Rather you are trying to separate web component from ejb component. If it is what you are trying to do, then do the following. In client side (ie. web component) provide "initial context", "provider url" and "package prefix", when you get the remote home of the server, an example follows. Hashtable env = new Hashtable(5); env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); env.put(Context.PROVIDER_URL, "localhost:1099"); env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces" ); testServicesHome = (TestServicesHome) serviceLocator .getRemoteHome(JNDINames.getTestServiceJNDI(), TestServicesHome.class); testServices = testServicesHome.create(); Now you have acquired the object reference, and you should be able to communicate with the server EJBs using the testServices object. Asiri -
thank for your suggestion Asiri[ Go to top ]
- Posted by: Milan Shrestha
- Posted on: June 05 2007 06:58 EDT
- in response to Asiri Liyanage
thank for your suggestion Asiri.... I would like to know what exactly is the distributed architecture like. And how EJB is used in those system. I would be thankful to know what will be the best design for the system like ours.... can my web server access a remote application server without using EJB.. thanks with regards Milan -
thank for your suggestion Asiri[ Go to top ]
- Posted by: Milan Shrestha
- Posted on: June 05 2007 07:27 EDT
- in response to Asiri Liyanage
thank for your suggestion Asiri.... I would like to know what exactly is the distributed architecture like. And how EJB is used in those system. I would be thankful to know what will be the best design for the system like ours.... can my web server access a remote application server without using EJB.. thanks with regards Milan -
Re: How to use EJB in distributed environment[ Go to top ]
- Posted by: John Smith
- Posted on: June 08 2007 02:23 EDT
- in response to Milan Shrestha
I have to use the EJB in a distributed environment
I would be thankful if anybody could tell me what are the steps to implement EJB in such a distributed Environment.
Use or implement? make up your mind! Just FYI, EJB is part of the 'distributed tech stack' that Sun has. If distributed deployment and distributed access is what you want, and you're using EJBs, you're on the right track.