• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Extracting jar file contents to JBOSS tmp directory

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.)
 
N Srinivas
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic