2 Replies Latest reply on Aug 13, 2007 4:58 PM by zebathon

    Specify jar-file in persistence.xml at certain position

    pieterjan

      Hi,

      I'm still using JBossAS 4.0.3 SP1 so therefore my applications are deployed as .par instead of .jar.

      Anyway, I'm referencing entity beans from one .par file in another .par file.
      So I added the referenced classes in the persistence.xml file. And everything works fine.

      But now, I would rather have the jar-file mentioned in the persistence.xml than the individual classes (for obvious maintenance reasons).

      And here's the thing: I found out that,

      the following line will look in : jboss-4.0.3SP1/bin

      <jar-file>referenced_project.par</jar-file>


      the following line will look in : jboss-4.0.3SP1/server/barc/deploy/BARC/applicationtwo/
      <jar-file>../referenced_project.par</jar-file>

      and this is okay when the par files are located in the same directory
      but in my case each project has its own directory, so...

      the following line will look in : jboss-4.0.3SP1/server/barc/deploy/BARC/applicationtwo/pplicationone
      <jar-file>../../applicationone/referenced_project.par</jar-file></jar-file>

      As you can see letter 'a' has been removed and the two dots did not make the deployer move/look in the correct directory.

      To make it even more obvious...
      the following line will look in: jboss-4.0.3SP1/server/barc/deploy/BARC/applicationtwo/icationone
      <jar-file>../../../../../applicationone/referenced_project.par</jar-file>


      So can anyone tell me what I'm doing wrong? Does the deployer use the dots as special characters and is there a workaround?

      In summary. What I want is to reference
      jboss-4.0.3SP1/server/barc/deploy/BARC/applicationone/referenced_project.par from the persistence.xml file in
      jboss-4.0.3SP1/server/barc/deploy/BARC/applicationtwo/project.par

      Cheers,
      Pieter-Jan Savat