tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John_canada <john_...@canada.com>
Subject Re: deployed in tomcat, remote client : Cannot connect to server
Date Mon, 20 Jul 2009 15:55:28 GMT

Thanks lots, Jean-Louis.

I have further questions:
1. How to deploy in jboss and weblogic (is it as same as for tomcat)?

2. for the lookup URL, when using http, when using ejbd?

3. in terms of performance, which lookup URL is better, http vs. ejbd?

Thanks
-- 
John 



Jean-Louis MONTEIRO wrote:
> 
> Hi John,
> 
> When using OpenEJB in Tomcat, you don't need to set the
> openejb.embedded.remotable=true (it is automatically set).
> To access ejbs, you can connect to http://localhost:8080/openejb/ejb
> instead of ejb://...
> 
> The full documentation is available at
> http://openejb.apache.org/3.0/clients.html
> 
> Jean-Louis
> 
> 
> John_canada wrote:
>> 
>> Hi,
>> 
>> This topic is similar as "deploy EJB on tomcat" in
>> http://www.nabble.com/deploy-EJB-on-tomcat-td22599057.html.
>> 
>> However applying the above solution could not make a change in my case.
>> 
>> I use tomcat 6, openejb 3.1.1, then copy openejb.war and myejb.jar into
>> tomcat6\webapps, also copy a file named system.properties (it just
>> contains "openejb.embedded.remotable=true") into tomcat6\conf and
>> myejb.jar\META-INF folders.
>> 
>> the remote client (in same machine) as:
>> 
>> Properties props = new Properties();           
>> props.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.RemoteInitialContextFactory");
>> props.put(Context.PROVIDER_URL,"ejbd://127.0.0.1:4201");
>> new InitialContext(props).lookup("myejb");
>> 
>> The exception is:
>> 
>> WARNING: Failover: Cannot connect to server(s): ejbd://127.0.0.1:4201
>> Exception: Cannot connect to server 'ejbd://127.0.0.1:4201'.  Check that
>> the server is started and that the specified serverURL is correct.. 
>> Trying next.
>> javax.naming.NamingException: Cannot lookup '/myejb'. [Root exception is
>> java.rmi.RemoteException: Unable to connect; nested exception is: 
>> 	java.rmi.RemoteException: Cannot connect to any servers: Server #0:
>> ejbd://127.0.0.1:4201]
>> 	at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:239)
>> 	at javax.naming.InitialContext.lookup(InitialContext.java:392)
>> ...
>> 
>> from http://localhost:8080/openejb/viewjndi.jsp, I know the ejb deployed
>> and it can be invoked (via the web-console and a my servlet deployed in
>> same tomcat).
>> 
>> Can any one know how to fix it?
>> 
>> Thanks
>> --
>> John
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/deployed-in-tomcat%2C-remote-client-%3A-Cannot-connect-to-server-tp24561481p24572457.html
Sent from the OpenEJB User mailing list archive at Nabble.com.


Mime
View raw message