[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Can not get connection to server. Problem establishing s
alexsbe
do-not-reply at jboss.com
Tue Apr 22 10:22:09 EDT 2008
Here is the answer of your questions
1) Is the client that you are running on a different system?
The OS of the client is Windows for the moment. It is a tomcat server (I tried with a java application for the same result).
2) Is the client running on Tomcat and the EJB deployed on JBoss?
Exact
3) Does it work if both Tomcat (client) and JBoss(EJB) are on the same machine? (I guess, that's what you meant in your comment, above).
Yes it is working if there are in the same machine.
4) Where have you placed the jndi.properties file? Are you sure it is being picked up? Can you try hard-coding the properties in the client code while doing the lookup and see if it works?
Yes it is picked up, and correct.
Here is the code of my method getcontext. I checked if the values I have setted are correct.
private static Context getContext() throws NamingException {
|
| ResourceBundle bundle = ResourceBundle.getBundle("jndi");
| Properties props = new Properties();
|
| props.put(Context.INITIAL_CONTEXT_FACTORY,bundle.getString(Context.INITIAL_CONTEXT_FACTORY));
| props.put(Context.URL_PKG_PREFIXES,bundle.getString(Context.URL_PKG_PREFIXES));
| props.put(Context.PROVIDER_URL,bundle.getString(Context.PROVIDER_URL));
|
| return new InitialContext(props);
|
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4145866#4145866
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4145866
More information about the jboss-user
mailing list