aspose file tools*
The moose likes JBoss/WildFly and the fly likes Extracting jar file contents to JBOSS tmp directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Extracting jar file contents to JBOSS tmp directory" Watch "Extracting jar file contents to JBOSS tmp directory" New topic
Author

Extracting jar file contents to JBOSS tmp directory

N Srinivas
Greenhorn

Joined: Mar 04, 2010
Posts: 4
Hi,
I have deployed a war file in JBOSS deploy directory. When I start JBOSS the contents are extracted to tmp and other folders.
Now since we have done customizations for a customer, I have created a jar file with those files and deployed in JBOSS deploy folder. But these files are not getting extracted to tmp directory or its not overwriting the existing files.
Please help me in achieving the same.

To be more precise, I want to overwrite the files which are customized on top of the core product.

Thanks
Srinivas N
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
If you deploy your application as a .war file to the server's deploy directory, you shouldn't have to do anything other than just copy a new version of the .war file to the server's deploy directory. The entire application should get re-deployed at that time (within a few seconds, anyway).

If this isn't happening, that's a problem. Perhaps you can describe what's actually going wrong with your application?

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

1) Have you turned off the hot deployer? Or changed the hot deployer settings in any way?
2) Are you certain that the timestamp on the updated WAR is more recent than the timestamp that was on the previous WAR?
3) Are you certain that you placed the new WAR in the correct location? That is, in the deploy directory of the running configuration?
4) Have you added any external deploy directories?
5) What version of JBoss AS? (I know you are going to ask questions about my questions, like "what file is xxx in?", and if I know the version of JBoss AS I can give specific answers.)


JBoss In Action
N Srinivas
Greenhorn

Joined: Mar 04, 2010
Posts: 4
Hi Thanks for the reply and extremely sorry for late response...Please find my answers inline..
Peter Johnson wrote:1) Have you turned off the hot deployer? Or changed the hot deployer settings in any way?
We have not turned off the hot deployer and we have not changes any settings
2) Are you certain that the timestamp on the updated WAR is more recent than the timestamp that was on the previous WAR?
Yes..But the customized files contains in a jar file and not in war file..So the deploy directory has 1 war file and 1 jar file
3) Are you certain that you placed the new WAR in the correct location? That is, in the deploy directory of the running configuration?
Yes
4) Have you added any external deploy directories?
No
5) What version of JBoss AS? (I know you are going to ask questions about my questions, like "what file is xxx in?", and if I know the version of JBoss AS I can give specific answers.)

jboss-4.2.3.GA
N Srinivas
Greenhorn

Joined: Mar 04, 2010
Posts: 4
Mark E Hansen wrote:If you deploy your application as a .war file to the server's deploy directory, you shouldn't have to do anything other than just copy a new version of the .war file to the server's deploy directory. The entire application should get re-deployed at that time (within a few seconds, anyway).

If this isn't happening, that's a problem. Perhaps you can describe what's actually going wrong with your application?



Hi Thanks for the reply and extremely sorry for late response...
I have deployed the new application with customized files as a jar file rather than another war file..So we have 1 war file and 1 jar file running in JBOSS deploy directory. So is it a problem? Should I try creating another war file rather than a jar file?
Thank You once again
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

You need to provide a very detailed description of how the customizations are defined in the JAR file and how they are picked up by the WAR file. I can think of several reasons why this will not work, but then all of those reasons are based on assumptions of the customization mechanism. A concrete example of one of the customizations, both how declared in the JAR and how accessed in the WAR, would be helpful.
N Srinivas
Greenhorn

Joined: Mar 04, 2010
Posts: 4
Peter Johnson wrote:You need to provide a very detailed description of how the customizations are defined in the JAR file and how they are picked up by the WAR file. I can think of several reasons why this will not work, but then all of those reasons are based on assumptions of the customization mechanism. A concrete example of one of the customizations, both how declared in the JAR and how accessed in the WAR, would be helpful.


Hi Johnson,
Thank You once again for quick responce.
We have a core product which consists of java, jspx, js, xml and properties files. I am compiling and making a war file. Deploying it in JBOSS deploy folder. No isssue.
Now as part of customization, we have modified 2 java files, 2 properties files and 2 jspx pages. Now I want to create a jar or war file and deploy it in JBOSS deploy folder, so that these customized files will overwrite the original files and the changes will be seen in the product.
Reason: We are doing customizations for 10 customers and we want to avoid code merging. Or is there any better way of doing this. I think I am clear what I want. Any suggetion or guidance is welcome. I will try it out.
Thanks in advance.

Srinivas N
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Peter Johnson wrote:A concrete example of one of the customizations, both how declared in the JAR and how accessed in the WAR, would be helpful.

Considering that you use five different types of files, you might need to provide five examples. With each type of file there are many reasons why what you are doing will not work but without concrete examples I have no solutions.

What I have always done is set up the build to create a custom WAR. Or an alternative is to provide an Ant script that will rebuild the WAR with the custom contents. Or placed the properties file in the server/xxx/data directory - that is in the classpath which makes it easy to read the properties file.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Extracting jar file contents to JBOSS tmp directory