Hey,
We are trying to get an EJB on one jboss instance to make a remote method call 
to an EJB on another jboss instance (version 4.0.3SP1).  In both cases, the 
EJBs are clustered.  The problem, however, is that all attempts to contact the 
"remote" EJB result in method calls to the local jboss instance.  Initially, 
the caller had both applications running, so a "successful" call was made to 
the local application (not really successful because we are trying to call the 
remote service!).  When we removed the local instance of the other application, 
then we would just get "service not found" exceptions.  The code snippet 
involved is:

  
  | public MetadataRepository getMetadataRepository(String otherUrl) throws 
CreateException, RemoteException, NamingException {
  |     Properties env = new Properties();
  |     env.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");
  |     env.put(Context.URL_PKG_PREFIXES, 
"org.jboss.naming:org.jnp.interfaces");
  |     env.put(Context.PROVIDER_URL, otherUrl);
  |     Context ctx = new InitialContext(env);
  |     Object ref = 
ctx.lookup(com.hmsonline.scorpio.client.MetadataRepositoryHome.JNDI_NAME);
  |     return 
((com.hmsonline.scorpio.client.MetadataRepositoryHome)PortableRemoteObject.narrow(ref,
 com.hmsonline.scorpio.client.MetadataRepositoryHome.class)).create();
  |   }
  | 

I've poked around jira and the wiki and seen some references to past bugs which 
talk about "optimizations" of clustered method calls which end up making local 
calls, however all referenced bugs seem to be "fixed" (e.g. JBAS-1442).  Any 
ideas on what i might be doing wrong?

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3944541#3944541

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3944541


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to