Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-04-2009, 11:09 AM
Member
 
Join Date: Aug 2009
Location: UK
Posts: 2
Rep Power: 0
Goose is on a distinguished road
Default Best practice for packaging add-ons
I am currently in the middle of reworking a custom apache-tomcat application and want to take the opportunity to resolve numerous problems we had with the old version.

A large number of our customers ask for specific customisations of the product which which do for them. The problem is that we are constantly working on the product adding new features/bug fixing etc and this means all the customizations need to be merged in if we upgrade those customers.

To try and solve a the majority of these situations I have been working on a rendering engine. Each screen in the application has a settings file, FreeMarker template and java class to render/process the screen through the use of reflections. These files will exist in a 'standard' directory. A customized version of these files can be placed in a 'custom' directory and these will be automatically used instead. In addition I can add new screens into the 'custom' directory for a customer. The theory is that we can easily upgrade and overwrite the 'standard' directory without touching their customisations.

What I would like to do however is package the three files (or more if required) into a single 'add-on' file. I've not used jars too much and whilst reading up about them found there are a few different archive formats including war, rar (not winrar) and ear. Which would be the most suitable and why? I generally need to include one or more of the following file type: .class .xml .ftl
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 08-04-2009, 12:36 PM
Member
 
Join Date: Aug 2009
Location: Kharkov, Ukraine
Posts: 29
Rep Power: 0
vkorenev is on a distinguished road
Send a message via Skype™ to vkorenev
Default
I think that plain jar is the most suitable here.
war is for web apps.
rar is for resource adapters.
ear is for packing all of those together.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-05-2009, 11:51 PM
Member
 
Join Date: Aug 2009
Location: UK
Posts: 2
Rep Power: 0
Goose is on a distinguished road
Default
Thanks for the reply. After much reading up etc I managed to package the files into a jar and access them at run time but as the class stored in the jar references other classes not contained within the jar the class loader throws a NoClassDefFoundError exception.

I'm thinking it might be less hassle forgetting this idea and stick to separate files. I have learnt a couple of new things though so it was worth looking into.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Packaging all files into a single executable .jar ichwar New To Java 5 01-27-2010 02:31 AM
SCJA - practice Mihail Kravsun Professional Certification 2 04-29-2009 08:26 AM
Packaging and Running Java Apps JL4 New To Java 1 04-08-2009 08:17 PM
Packaging Driver and Applet ibanez270dx New To Java 0 11-14-2007 02:18 AM
Packaging and accessing data files todd Advanced Java 1 08-01-2007 01:27 AM


All times are GMT +2. The time now is 08:33 PM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org