Discussions

EJB design: How to use EJB in distributed environment

  1. How to use EJB in distributed environment (4 messages)

    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 Milan
  2. 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
  3. 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
  4. 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
  5. 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.