EJB programming & troubleshooting: call local entity beans across jboss wars

  1. call local entity beans across jboss wars (1 messages)

    i am writing a web service and i want to have it in a second war running on jboss4.0.5. I am able to construct an EJB3 remote bean, but i am having problems constructing the local instance of that bean. i get a wierd runtime error: java.lang.RuntimeException: Non matching type for inject of field is this even possible? am i doing something wrong? factory code: T ejbInstance = null; try { Context ctx = getInitialContext(remote); String jndiName = (remote ? REMOTE_JNDI_BASENAME : LOCAL_JNDI_BASENAME) + ejbClass.getSimpleName(); Object obj = ctx.lookup(jndiName); if (remote) { ejbInstance = (T) PortableRemoteObject.narrow(obj, ejbClass); } else { ejbInstance = (T) obj; } Note: the remote initialContext is setting up my remote properties.
  2. Whenever I have problems like this, I go to jira.jboss. I could be a number of things. Office Sofa