2 Replies Latest reply on Mar 17, 2008 4:17 AM by Frank Henry

    Hot deploying EJBs

    Ruwan De Silva Newbie

      I am using Netbeans 6.0.1 and I feel my ejbs are not upto date.
      i.e. even though .jar file is copied to the jboss deployment folder, it runs
      a previous version of my ejb. always i have to restart my jboss server always. then only it uses the correct version. even it works only if i run run.bat in jboss bin. if i restart the jboss server using netbeans it still runs the previous version of my ejb.

      Is this a problem(nature) in jboss or netbeans? How can I avoid this, so that i can hot deploy all my ejbs without restarting jboss?

      (I am using jboss 4.22)

        • 1. Re: Hot deploying EJBs
          Naveen Sisupalan Newbie

          If you deploed the application using EAR file, then just touch your application.xml file. It will restart that project only. If you are using custom ANT file, then this is very easy to do.

          • 2. Re: Hot deploying EJBs
            Frank Henry Novice

            Do *.jar files even get read by the JBoss hot deploy scanner?

            Or do you mean a *.ear?
            Did you replace the *.ear?

            Just to make sure you are using the correct files. Countless times I have tripped over that one.

            Are you using exploded deployment?
            If not, skip this part. If you are curious, read on.

            What I presume javarebel means is when you do exploded deployment.
            Meaning you can unpack the contents of your ear/war/whatever into a folder with the name of your package + extension (unpack MyApp.ear -> ./MyApp.ear/) then you can simply replace the embedded jar file but need to touch the controlling .xml file JBoss requires the package to have.

            Note, you can only have one of the possibilities in your deploy folder.
            Either the directory or the package.

            Sounds more complicated then it is.