0 Replies Latest reply on Dec 16, 2003 7:52 AM by squeak

    Appropriate packaging for ejbServer and ejbClient for redepl

    squeak

      I have a jar file that contains my DAO objects, along with my EJB classes, including all of the interfaces -- let's call this DaoEJb.jar. That jar file is packaged with the library jar files I need into an ear file, and deploys fine.

      Now, I have a seperate war application that is a client of these ejb's that is deployed into the same container. It contains jsp's that access the ejb's and DAO's. It accesses the EJB's using the remote interface (with the intent of it then defaulting to the local due to Jboss optimization). I have tried putting the DaoEJb.jar file in the lib directory of my war file, and it will deploy fine, jsp's will compile. All is great, that is until I try to redeploy my war file with changes to my jsps. I get the following error:

      EJBException:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract org.osn.ejb.PersistenceService org.osn.ejb.PersistenceServiceHome.create() throws javax.ejb.CreateException,java.rmi.RemoteException
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invokeHome(StatelessSessionContainer.java:632)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:205)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invokeHome(StatelessSessionInstanceInterceptor.java:51)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:267)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:98)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)

      Now, if I remove the DaoEJb.jar from the lib directory of the war file, it will redeploy ok (beacuse I am assuming now it defaults to the classloaded of the ear file) -- however, this only works if I precomile my jsp's. Otherwise jasper fails because it doesn't know about my DAO's and ejb's.

      So my question is: Given my scenairo of an ear file that contains my EJB's, and seperate war files that should be able to be redeployed, what is the best practice for pacakging up my jar's? Where should I put my DaoEJb.jar. I would prefer to not put it into the lib directory of the JBoss server so I can redeploy the EJB's when nessecary as well.

      Thanks!