jboss 5.0.1 doesnt support hot deployment? - jboss5.x

when i hot deploy a bean jar , it doesnt works. it needs a Jboss restart. hot deployment works fine with Jboss 4.2.2. but Jboss 5.0.1 doesnt support hot deployment?

By default hot deployment is turned on for all JBoss versions. For JBoss 5.X check if you have proper configuration in $JBOSS_HOME/server/xxx/deploy/hdscanner-jboss-beans.xml file.
That's the theory however. In JBoss 5.0.X I had a serious issues with hot deployment mechanism, for instance I could deploy application only one time, the redeployment demanded server restart (as in your case). This issue is partly gone in JBoss 5.1, so if you can upgrade to that version.
You can also try theoretically the savest method of deployment through managed beans facility:
$JBOOS_HOME/bin/twiddle invoke "jboss.system:service=MainDeployer" deploy /my/path/to/app/myapp.ear
Also make sure if your JAR file is proper, configuration files are properly formulated. JBoss 5.X is much more restrictive then previous versions when it comes to configuration files. For istance in JBoss 4.X persistence.xml file need not have XML Schema declaration, in JBoss 5.X it is required, etc.

Related

Glassfish: Fast hot deployment setup

What is a good setup for really fast hot deployment of a Java EE application to Glassfish, so the changes are visible in less than e.g. 1 second?
Currently I'm using Eclipse Luna to develop a JSF2.1 application on Glassfish 3.1.2. When I change something in a jsf, a managed bean or an ejb, it takes ages to deploy the changes. I've already found some good advise,
GlassFish (real) hot deployment of JSF pages and resources (CSS etc.) in Eclipse
Glassfish taking 20s to do hot deployment, is that right?
but I don't think I can speed up my setting to get the deployment under e.g. < 1sec. Also I think "directory deployment" is not supported in GF3.
So what setup can you recommend? Should I switch to Netbeans? Or are there any hidden Eclipse settings to speed this up? Or do you reach fast hot deployments with Eclipse Luna and I'm just missing some properties?
Some more information: I have to use GF3.1.2 Furthermore I use maven, the backend jar and the front end war are bundle together in an ear file. I use EJBs and JPA to connect to a DB2 database. So except GF nothing special.
As far as I know, Glassfish does not support hot deployment. You would need something like JRebel to accomplish that. In case you're not bound to glassfish you might consider switching to wildfly or some other AS that supports this feature.

How to configure deployment from Eclipse to Wildfly

When I deploy app using jboss-as-maven-plugin
mvn clean jboss-as:deploy
application works. When I try to deploy from Eclipse using e.g. "Full publish", it doesn't.
I've compared versions of application being deployed and seems that "Full publish" simply copied what has been specified in Properties > Deployment Assembly.
Is it possible to use this plugin during "Full publish" ?
I want to make use of hot deploy feature for jsp, but without properly configured automatic deployment from Eclipse I'm rather blocked.
regards
Lukas
Wildfly 8.0.0.CR1
Eclipse Keppler SR1
org.jboss.as.plugins:jboss-as-maven-plugin:7.2.Final
I just updated to wildfly, and I had to use this to deploy to jboss.
https://docs.jboss.org/wildfly/plugins/maven/latest/deploy-mojo.html
I am as troubled as you are with this.
After searching a bit more I have found these two suggestions in SO:
A: Eclipse Kepler and JBoss Wildfly hot deployment and
B: Hot deploy on JBoss - how do I make JBoss “see” the change?
In both cases I did a mvn install in order to create war file and then deployed it by right clicking the server and using add-remove. Now every time I changed something and then pressed save the console output would change informing me that 20:02:45,086 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018565: Replaced deployment "web.war" with deployment "web.war". If I pointed my browser to the URL of my project the changes would indeed be there.
NOTE: Be careful when undeploying in the second case. I had it undeployed from eclipse but when going at: http://localhost:9990/console/App.html#deployments I could still see the war so I also had to remove it by pressing the remove button from the Management Console.
I hope this helps but I am not sure that this kind of functionality is hot deployement though.

JBoss ejb3.0 instant hot deployment

I am newbie with jboss-eclipse. I have to work on javaEE5 with JBoss AS 5.1.0.GA. I don't want to use JRebel at the moment.
I installed "Eclipse Java EE IDE" with "JBoss Tools". I added the JBoss 5.1 Runtime server on eclipse and added a new ear project with :
an EJB3.0 class in ejb project;
a javabean class and index.jsp in web project.
I noticed when I make a modification in the jsp file, I can see instantly the changes after refreshing the web browser. That's ok.
When I modify EJB and javabean classes, there is no instant hot deployment. I have to restart the ear application (without restrating jboss server) or "full publish" the ear via eclipse to see changes.
Is there any way to have instant hot deployement for EJB and javabeans?
PS: I tried "incremental" publish but it hasn't worked.
Thank you!
You do need 3rd party tools for that, the most notable being JRebel. Without advertising I have to say this tool has saved me lots and lots of hours already while developing EE applications.
In jboss AS 7.1.1 you just have to go to the as admin console at localhost:9990 and select: Profile -> Core -> Deployment Scanners -> Auto-Deploy Exploded . You might also want to change the scan interval to something smaller. Afterwards, you may deploy your application for the first time by selecting "Run on Server". From this time on, your application will get automatically deployed whenever you change a file and it manages to compile.
I do not know if Jboss 5.1 has this feature, and if I were you I'd consider using 7.1.1 for development when it does not have it.
The hot deployment works fine with JBoss when publishing new files in your deploy folder, only class exchange will not happen in your currently deployed application.
That's why you see changes to all static content like HTML files immediately, but not changes to your java code.
In order to do activate them, you'll have to restart your application (not the whole JBoss, only your application, done for example in JBoss server view).
I have no practical experience with JRebel and I do believe that it saves you time, but you have to be careful with such tools, as they can introduce new problems which you spend much times in debugging, ending up in restarting the container and everything works fine.

Tomcat 6.0.20 # STS 2.5.1==Error while app startup -No web.xml present

I am facing a problem while deploying my web app in STS 2.5.1 IDE. I am using Tomcat 6.As I am working in a development project, so rebuild and deployment of the project is very common.But sometimes while deploying my app , I receive NO WEB.XML present.
Although , I resolved this problem by removing app from tomcat, cleaned tomcat work directory, added app again, and start the server, then it worked.
My question - is this happening due to some cache being exhausted or there is some other cause.It seems that cleaning, removing and adding the prj work every time for me whenever this error is coming OR tomcat is not supposed to handle such a large project.It is very cumbersome procedure to remove, clean and restart again and again, after all you change your code a lot in development.
My technology stack is listed below:
SWF 2.3.0
Primefaces 2.2.1
JSF 2
Spring Security 3
Spring 3.1.0M1I
EhCache
Apache Tomcat 6.0
STS 2.5.1.
I think it's an eclipse issue. It seems that eclipse is not able to clear its server cache directory. There are times that you'd have to manually clear this cache, especially in large projects where eclipse can't update some of the project's dependencies.
You'll find the projects deployed in your eclipse integrated tomcat server at:
workspace.metadata.plugins\org.eclipse.wst.server.core\tmp\wtpwebapps

jboss seam deployment error

I am using the JBoss Tools to deploy a seam application to a JBoss server from within eclipse. I am consistently seeing a strange behavior. Every time the .xhtml files are changed the seam application is auto-deployed as expected. However, the entity manager instance is becoming null and I am forced forced to restart the seam application by removing it and adding it through the eclipse server view. The whole process is taking more time than I can afford. Is there a workaround to this problem?
If you change a xhtml file only that single file should be copied and the entitymanager should not be affected. Are you refreshing the browser ? Triggering some specific action on that page ?
I'm guessing you use JBoss 5.1.0 server? If yes, there are a bunch of problems with this server while working with Seam especially in version 2.2.0. You may also read about general problems with deployment to JBoss5 container.
The other thing you must remeber is to set debug mode for Seam and development mode for facelets. Whitout this two configurations hot deployment won't work.