Generally speaking an EAR contains a WAR. If you change a .ear, .war or .jar
extension to .zip on Windows you can see what's in them.

An EAR is an enterprise archive, a WAR is a web archivce, and a JAR is a
Java archive. An JAR cannot contain other JAR's, a WAR can contain JAR's,
and an EAR can contain WAR's and/or JAR's.

Do you have the source for the EJB's? You could add your class to it and
export it as an EAR.

Actually, you will have to add it to the existing EAR. The listener will
have to be in the web.xml file. You can do it manually, but it's a pain or
at least I have not found an easy way to do it once it's installed.

So, I guess here is the bottom line. Take the EAR EJB and import it into a
J2EE project on RDi (or WDSC), add your new class to the appropriate package
in the Web project and export it as an EAR.

I hope this makes a little sense, I don't know that I amm explaining this
very well.

--
James R. Perkins


On Wed, Apr 29, 2009 at 10:13, Lim Hock-Chai
<Lim.Hock-Chai@xxxxxxxxxxxxxxx>wrote:

I'm new to web stuff. So... pardon me if I ask silly question.

I've created a class that extends ServletContextListener and planed to
use it run some EJB methods that needs to be executed during container
startup. All our EJB are packaged into a EAR to deploy.
ServletContextListener is a web stuff and I'm assuming that it is
typically get deployed thru a WAR project. My question is that is there
a way to deploy my ServletContextListener class in the existing EJB EAR
project?

Thanks
--
This is the Web Enabling the AS400 / iSeries (WEB400) mailing list
To post a message email: WEB400@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/web400
or email: WEB400-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/web400.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.