I'm having trouble understanding how to configure the Deployment URL for JRebel for JBoss, when our application is not deployed as an exploded war, but via a Maven deploy using JBoss's CLI features.
In the properties window for JRebel (in Eclipse) what is required in the Deployment URL? Generally it's something like http://my.server:1234/my-application. However if we have no such directory then how is configuration done? is it even possible?
Deployment URL requires an address in the format:
Deployment URL: http://serveraddress:port/???
You only need to use the JRebel remoting functionality (adding the deployment URL) if you're deploying your application onto a server that is on a different machine or VM than your IDE.
If you start JBoss from the CLI on the same machine as your IDE, then you don't need the deployment URL and should turn off remoting. Just need the Java agent and rebel.xml files.
JRebel remoting Deployment URL is your application home page URL. JRebel will start listening on that server on a specific path that IDE knows to send the changed files over HTTP POST requests.
It is also possible to make JRebel listen to these HTTP request on custom port if needed. JVM argument -Drebel.remoting_port=[portNumber] will make this happen.
Related
For my Spring-Boot project, I have used jasypt library for encrypting my datasource.password in application.properties file. In my localhost setup, I have configured VM arguments in eclipse and it works completely fine.
-Djasypt.encryptor.password
-Djasypt.encryptor.algorithm
Now, I want to deploy my application to Tomcat server where I am not able to figure out where to configure these VM arguments so that Tomcat picks them when I click on "start" button from Tomcat Manager GUI.
Read solutions about setenv.sh but I think that works at complete Tomcat server level. I need to pass these arguments only for my current application without affecting other applications which are already hosted.
Any help is appreciated.
I have a library that relies on exporting a sun.reflect package from JRE.properties. During testing I have been manually adding this. What can I do to ensure this is automatically added within Apache Karaf?
Changes to the etc/jre.properties requires a container restart. If you are deploying this Karaf instance inside a Linux container (aka Docker), you would simply include this change as part of the linux container image build.
However, if you are deploying into a Virtual Machine environment, you'd want to make this part of your organization's custom build of Karaf. I suggest using a Maven project with the Assembly plugin to apply all your organization's changes-- ldap, security, ssl certs, etc/jre.properties... etc. It would then create a new .tar.gz or .zip file that and you would deploy your app into the modified Karaf instance.
There is an example in the HYTE Runtime build here:
HYTE Runtime
Technically, you could leverage the feature deployment mechanism to deploy an updated file, but this won't cause the Karaf instance to restart.
I have installed IBM Worklight Server 6.0 in WAS 8.0.
I have deployed a projectA.war & projectB.war via ant script and I can access both the console with the different context root.
The problem I am facing here is, I have deployed the appA.wlapp in projectA.war via the Worklight console, the same application is available when I access the projectB.war console.
Can anyone help me to find the solution?
My only guess right now is that there is a mutual database for both projects so you see the same app in both consoles (and that too only happens w/out an error because maybe the different .war files have identical authenticationConfig.xml settings).
That is, the same database configuration is used for both projects; This configuration is either:
Part of the .war files that you deploy (in worklight.properties), or
Something that you configure in the Ant task script used to deploy the .war files, or
Some configuration in the application server hosting the .war files.
See documentation: http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp?topic=%2Fcom.ibm.worklight.help.doc%2Fadmin%2Fc_clustering.html
I created a web application using Jersey through this maven code:
mvn archetype:generate -DarchetypeArtifactId=jersey-quickstart-webapp \
-DarchetypeGroupId=org.glassfish.jersey.archetypes -DinteractiveMode=false \
-DgroupId=com.example -DartifactId=simple-service-webapp -Dpackage=com.example \
-DarchetypeVersion=2.4.1
And I am using Tomcat v7 as my Java server. When I finish writing some code, I use mvn's package command to generate a .war file, copy this file to the /webapps folder and then start tomcat to run my application and test it on browser. But I think I waste lots of time doing these things. So I want to ask if there is an easier way test my code on browsers. How do you guys run your web applications, especially Jersey app, on your server?
And I am using Intellij Idea, does it have some features that help me build and run Jersey apps, or other J2EE apps? how to use them?
In IntelliJ IDEA you can create a Tomcat Run/Debug configuration. In that configuration you can specify "before launch" tasks/options, including running a maven goal. So by running the Tomcat configuration, IDEA will run the maven goal, deploy your code to Tomcat, start the tomcat server, and (if desired) open you web browser to a specified page.
JetBrains has a Getting Started with Spring MVC, Hibernate and JSON tutorial. What you want to do is very similar. The main difference is you will need to remove the default "make" option in the "Before Launch" section at the bottom of the run/debug configuration and instead have it run your maven task.
There is also the Creating a simple Web application and deploying it to Tomcat tutorial. It's a little older and some of the options on the run/debug dialog have changed. But at the core, its still valid. Combined with the above, you should be in good shape.
Finally take a look at the Run/Debug Configuration: Tomcat page in the help guide (also available in the online webhelp).
I've recently started a new job wherein I have to fix bugs with and make additions to a suite of GWT applications which have had a lot of contributors/developers of the years :(
App Server: Tomcat 6.0.16
JRE: Java 6
GWT: 2.5.0
Eclipse: Juno
The strange thing about this configuration is that for each application in the suite (there's about 4) the client-side code is separated into it's own war file and the server-side code is separated into several war files.
The problem is that the various components (war files) have reliance's on one another and interact during runtime.
Request
Basically, I have gotten server-side debugging working but I would like to get client-side debugging working via Eclipse; so far I haven't been able to.
Code Layout
When the code is fully deployed to Tomcat, it looks like this:
webapps
serverPiece1
WEB-INF
classes
...
web.xml
...
serverPiece2
WEB-INF
classes
...
web.xml
...
clientApp1
WEB-INF
web.xml
index.html
...
clientApp2
WEB-INF
web.xml
index.html
...
clientApp3
WEB-INF
web.xml
index.html
...
Past Experiences
At my last job my team was the only team developing using GWT and Maven.
We were able to design and implement the applications and thus we kept things simple.
For each application, we kept all of the client & server code in 1 WAR file.
All shared components that we created (window management system, etc...) were JAR'd up and included in each applications WAR file.
Doing things this way made for a very simple debug setup; we were able to debug both the client & server code using Eclipse while running the applications in Tomcat or Weblogic.
There is a setting which allows you to start the GWT dev mode with an external server.
See here for more details. Basically you do following things:
Start your App server in debug or run mode (depending if you want to also debug your backend code in eclipse).
Start GWT dev mode with the -noserver option (which won't start the embedded jetty container).
Go to the URL that is served by your app server (i.e. http://localhost:8080/index.jsp?gwt.codesvr=localhost:9997)
If you use maven you can run the dev mode with following command : mvn gwt:run -Dgwt.noserver=true