aspose file tools*
The moose likes JBoss/WildFly and the fly likes How to patch application code into JBoss 5.1 server deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How to patch application code into JBoss 5.1 server deployment" Watch "How to patch application code into JBoss 5.1 server deployment" New topic
Author

How to patch application code into JBoss 5.1 server deployment

Sham Phadtale
Ranch Hand

Joined: Jul 29, 2008
Posts: 75
Hello all,

I have sar, ear and war files deployed in JBoss 5.1 AS. After fixing some bug I want to give updated files to client in a patch.
For testing purpose of patch deployment using jboss.patch.url variable I updated one logger message, created ear file containing changed file and all unchanged files and put it into patch folder created under ...\server\jboss-5.1.0.GA directory.
I am starting server by calling run.bat with "-c -Djboss.patch.url=file:/D:/release/server/jboss-5.1.0.GA/patch" option.
After server started I check log, it shows old message, that is patch does not got deployed. I also tried with giving ear file name while running run.bat file("-c -Djboss.patch.url=file:/D:/release/server/jboss-5.1.0.GA/patch/app.ear") but no success.

Please can someone put light on what is incorrect.
I also have few queries -
1. What should be conatin of patch folder, always jar or we can put ear/sar file into it?
2. Is patch ear should contain only updated class files with package structure as or it can contain other files which are not changed?
3. Is there any other jboss variable which can block patch deploment - restricting of usage of jboss.patch.url variable?
4. What should be patch location?

On internet and in JBoss documentaion I did not got enough information about patching, if anyone has any reference about this please provide it to me.

I have put above question at following link also.
https://community.jboss.org/message/201387

Regards,
Sham
Sham Phadtale
Ranch Hand

Joined: Jul 29, 2008
Posts: 75
In server following log statement is getting print..

18:48:26,821 INFO [ServerImpl] Patch URL: null

Does thi mean serevr is not getting patch URLwhich I am providing using jboss.patch.url?
If so, what can be the reason behind this behaviour?
Sham Phadtale
Ranch Hand

Joined: Jul 29, 2008
Posts: 75
Hey, I am able to solve it..
I edited run.bat file and added patch path as below
set JAVA_OPTS=-Djboss.patch.url=file:\D:\jboss-5.1.0.GA\patch %JAVA_OPTS%

Now jboss loads updated classes.

But I am also getting following exception -

Sham Phadtale
Ranch Hand

Joined: Jul 29, 2008
Posts: 75
IlegalAccessError is resolved by patching whole package of changed class.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to patch application code into JBoss 5.1 server deployment
 
Similar Threads
Deployement problem
Running JBoss 5.1.0 All Server
Best packaging and deployment strategy for web applications
Error While Starting JBoss 5.1.0 GA!!!
Server started with Deployment Errors