File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JBoss/WildFly and the fly likes Two instances of a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Two instances of a servlet" Watch "Two instances of a servlet" New topic

Two instances of a servlet

Anselm Paulinus
Ranch Hand

Joined: Sep 05, 2003
Posts: 390
We are trying to create an application to be deployed once on JBoss both as a Test.ear as well as a Dev.ear so the Testers could use the Test file while the developers use the Dev files. If any body has knowledge of how I can go about this on JBoss, please explain in details.

Jeff Shelley
Ranch Hand

Joined: May 21, 2003
Posts: 70
Hi Anselm,
you could put the same war file in two ears, and have application.xml configured to have two web modules with two different contexts.

A problem with this is that dev.ear and test.ear could get out of sync when a developer rebuilds and deploys one but not the other. If this is a problem, you might be able to work something out by putting the war in the deploy directory and having one of the ears point to it, but I imagine you'll get enough ClassCastExceptions to warrant doing it the first way.

Best of luck!


It's almost Friday
Anselm Paulinus
Ranch Hand

Joined: Sep 05, 2003
Posts: 390
Thks Jeff:

At least, I have a starting point.
I agree. Here's the link:
subject: Two instances of a servlet
It's not a secret anymore!