1

Just trying to setup remote deployment of projects to Jboss AS 4.2.1 using Jrebel.

After enabling the JRebel for my project in eclipse along with the remoting feature, it asks for the deployed app's URL in the server. How do I get to know the URL of my project so that I can mention that in the JRebel remoting section?

I thought of looking it up in the JMX console but my project jar will reside in the lib folder of the EAR that's deployed to the server, so I wasn't able to locate it there. Can anyone help me out?

mystarrocks
  • 4,040
  • 2
  • 36
  • 61
  • If you deploy an application, how do you locate it on the server? If you deployed the app it is reasonable that you can access it, right? So that is the very same URL that JRebel requires. – Anton Arhipov Mar 19 '13 at 00:00
  • Well, it's just that other deployed applications will make use of my application that will be present in the lib folder of the server. Just like any 'provided' maven dependency would occupy the lib folder of a server like tomcat. How do I URL locate such a project? – mystarrocks Mar 19 '13 at 01:03

1 Answers1

2

JRebel Remoting requires a HTTP facing component to function. It makes use of the HTTP protocol using the same port as the web container. This means zero conf (sort of) and no holes to poke into the firewall, but the downside is that it won't work for apps with no WAR module in them (yet :)).

I assume your app is a jar file inside an ear. All it needs is a war module in that ear. That war does not need to have rebel.xml nor rebel-remote.xml in it. Create the WAR if one does not exist.

The URL would be the address you have to enter in a web browser to access that webapp. For example http://example.org:8080/MyWar/

Also make sure you have the rebel.xml and rebel-remote.xml in the deployed library project (simply creating them in Eclipse is not enough, those two xml files have to end up in the server).

Also, you need to install and activate JRebel on the remote server machine, then start JBoss with the following JVM arguments: -javaagent:path/to/jrebel.jar -Drebel.remoting_plugin=true where path/to/jrebel.jar points to the installed jrebel.jar file

More info: http://zeroturnaround.com/software/jrebel/remoting/

In your case the layout of the EAR could look like this:

- myapp.ear
    - webapp.war
    - someEJB.jar
    - lib/
       - yourApp.jar
          - WEB-INF/classes/
             - rebel.xml
             - rebel-remote.xml

       - someOtherLib.jar

--

Arnel

JRebel Remoting Tech Lead

Arnelism
  • 1,484
  • 1
  • 15
  • 22
  • I'm gonna try this and see if it works for me. So if I got you right, I got to have my project (jar) under a newly created war which will stay in the lib folder of my EAR. Correct? – mystarrocks Mar 20 '13 at 02:59
  • 1
    No, your jar can stay where it is (inside the EAR). You need to have a WAR module in that EAR for remoting to work. If it does not exist, create one in the root of the ear. – Arnelism Mar 20 '13 at 11:45