0 Replies Latest reply on Jul 26, 2011 11:40 AM by totoranky

    Running an EJB and its caller in two different ear on same JBoss

    totoranky

      Hi everybody,

       

       

      I have two ear running on the same JBoss instance (4.2.3).
      One ear containing an EJB with all its interfaces (Home, Remote, Local, LocalHome). (ear 1)

      The other containing en ejb caller which will reach my EJB with a JNDI lookup (ear 2). To do that I will need all EJB's interfaces at least for my compilation. So I created an client jar containg all EJB's interfaces, so my ear 2 contains this client jar.

       

       

      The server starts properly, but when I try to reach my EJB I have a well known exception

      Invalid invocation, check your deployment packaging, method=public...

      I read on this forum that it's due to the duplication of my ejb interfaces (one for the ejb ear the other in the client jar), but I delete the client jar I will have a violation exception, it seems that my ear 2 really need to have these interfaces. Indeed I have an isolation loading in my application.xml for other reasons, so I think it's normal to have this violation exception.

       

      I tried to put my EJB in the same ear than my EJB caller and everything work because I don't have several deployed EJB's interfaces.

       

       

      So I am looking for a way to have my two separate ear working together, If someone has a solution it would be great.

       

       

      Thanks