Works!! , verrry cool ;). I will update the docs, even though Dain has already written 99.9% of it, I will just add an example and probably add a couple of more steps to make it more step by step.
So, what needs to be done with the UI? I mean what do we need the UI for basically? On 9/12/07, Karan Malhi <[EMAIL PROTECTED]> wrote: > Thanks David > > On 9/12/07, David Blevins <[EMAIL PROTECTED]> wrote: > > > > On Sep 12, 2007, at 6:27 PM, Karan Malhi wrote: > > > > > Dain, > > > > > > Installation was successful!!. > > > > > > However, I put my bean classes in the classes directory, tried to look > > > it up from a servlet and am getting the following exceptoin. What am I > > > doing wrong? I am just tired, prolly need a strong cup of coffee. > > > > > > javax.naming.ServiceUnavailableException: Cannot lookup > > > '/GreetingBeanBusinessRemote'. [Root exception is > > > java.net.ConnectException: Cannot connect to server > > > 'foo://127.0.0.1:4201'. Check that the server is started and that the > > > specified serverURL is correct.] > > > > > > You should use the LocalInitialContextFactory instead of the > > RemoteInitialContextFactory. > > > > The LocalInitialContextFactory is used to connect to containers in > > your vm. > > The RemoteInitialContextFactory is used to connect over a network to > > containers in another vm. > > > > You could use the RemoteInitialContextFactory to connect to ejbs in > > your webapp, but you'd have to specify the serverUrl which would be > > something like this: > > > > Properties p = new Properties(); > > p.put("java.naming.factory.initial", > > "org.apache.openejb.client.RemoteInitialContextFactory"); > > p.put("java.naming.provider.url", "http://127.0.0.1:8080/openejb/ > > ejb"); > > InitialContext context = new InitialContext(p); > > context.lookup("GreetingBeanBusinessRemote"); > > > > Though, I'd only ever use that style if you wanted to connect via a > > standalone EJB client application. Use the > > LocalInitialContextFactory for looking up anything in your same vm. > > > > Properties p = new Properties(); > > p.put("java.naming.factory.initial", > > "org.apache.openejb.client.LocalInitialContextFactory"); > > InitialContext context = new InitialContext(p); > > context.lookup("GreetingBeanBusinessRemote"); > > > > > > -David > > > > > > > -- > Karan Singh Malhi > -- Karan Singh Malhi