2 Replies Latest reply on Jun 26, 2003 12:46 PM by Steve Stallion

    dependencies on classes or seperate Classloaders in EAR

    Wolf-Christian Herold Newbie

      I'm using Jboss for running different applications using some common classes.
      First I deployed everything in /deploy, building some common jars and some special EJB jars for my apps.
      When deploying new versions I hadto be carefull to to be shure common jars are deployed first and afterward the my SessionBean (using the common classes) were deployed. I had some problems when restarting jboss, because the deploymentsScanner started with the "wrong" jar.
      - So is there any possibility ( I don't really like to use change the naming of jars to fit dependencies of jars) to declare dependencies on jars when deploying?
      I'm not using MBeans. I'm using classes in SessionBeans.

      Next I thought it might be a solution to use EARs and deploy everything needed for my app in a seperate file.
      So my common classes will be deployed twice (or even more).
      But using EAR I got an Error while calling my methods:
      java.lang.LinkageError: duplicate class definition: "Classname".
      I tried to define seperate classloaders using a jboss-app.xml file:
      <loader-repository loaderRepositoryClass="org.jboss.mx.loading.HeirarchicalLoaderRepository3">
      <loader-repository-config configParserClass="org.jboss.mx.loading.HeirarchicalLoaderRepository3ConfigParser">
      But nothing changed.

      So, is it possible to deploy one class twice in deifferent EARs and how do I configure the classloaders?

      I'm using Jboss 3.2.1, (JDK1.4.1 on Win and 1.3.1 on Linux).
      Would be nice if anone had any idea!