jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: Ant + Cactus + JUnit
Date Wed, 23 Jan 2002 00:17:28 GMT
Hi Dorothy,

 

Thank you for your kind comments :-)

The steps you're describing are correct and are the recommended ones if
you're packaging your application as an EAR. We plan to add J2EE EAR
packaging to the Cactus web site soon and also add a sample EJB
application. 

 

The only thing about which readers should be careful is that depending
on your container you may need to add the cactus jars to your war
manifest.mf file with a Class-Path entry or, if it is not supported
(like in WL 6.1 up to SP1), duplicate them in your war WEB-INF/lib
directory. Dorothy, I still don't understand how your webapp could
locate the cactus.jar (for instance) without doing any of these ? Is
there a special feature of JBoss that automagically add the jars in the
ear root directory to the classpath for WAR J2EE modules ?

 

Anyway, I'm glad it works for you !

Cheers,

-Vincent

 

-----Original Message-----
From: Dorothy Gantenbein [mailto:dgantenbein@home.com] 
Sent: 11 November 2001 22:03
To: vmassol@octo.com; cactus-user@jakarta.apache.org
Subject: Re: Ant + Cactus + JUnit

 

Hi -

 

First, I have been using Cactus for a short time but it is awesome.  Our
company has already gotten a huge productivity boost using it.  As for
your questions.

 

After a lot of experimentation, I have my cactus unit tests deploying
and running in JBoss+Jetty within an enterprise archive (ear).  For my
case, I did not follow the directions about configuring web.xml in the
war file.

 

Here is a rough outline of the steps.

 

-     in your ear, add at the top-level cactus.jar, httpclient.jar,
junit.jar.  Depending on your needs, also add httpunit.jar, Tidy.jar,
and log4j-core.jar.

-     in your war, add only your servlet classes.  Do not the
WEB-INF/lib directory in your archive or do anything with Cactus in the
Class-Path (within Manifest.mf).

-     in your jar, add all EJB and test classes.  Add a Manifest.mf with
the Class-Path defined.  Here is my Manifest.mf.

 

Manifest-Version: 1.0

Created-By: 1.3.0 (IBM Corporation)

Class-Path: cactus.jar httpclient.jar junit.jar log4j-core.jar
httpunit.jar Tidy.jar

 

-     when you deploy your ear in JBoss, you should see something like
this when JBoss deploys your ear.  Notice that 'add all ejb jar files to
the common classpath' appears indicating that your Cactus jars are now
available.

 

[AutoDeployer] Starting

[AutoDeployer] Watching C:\repository\external\appserver\jboss\deploy

[AutoDeployer] Watching
C:\repository\external\appserver\jboss\deploy\lib

[AutoDeployer] Auto deploy of
file:/C:/repository/external/appserver/jboss/deploy/manager.ear

[J2EE Deployer Default] Deploy J2EE application:
file:/C:/repository/external/appserver/jboss/deploy/manager.ear

[J2eeDeployer] Create application manager.ear

[J2eeDeployer] inflate and install WEB module manager.war

[J2eeDeployer] install EJB module manager.jar

[J2eeDeployer] add all ejb jar files to the common classpath

[Container factory]
Deploying:file:/C:/repository/external/appserver/jboss/tmp/deploy/Defaul
t/manager.ear

[Verifier] Verifying
file:/C:/repository/external/appserver/jboss/tmp/deploy/Default/manager.
ear/ejb1002.jar

[Container factory] Deploying NexusCluster

[Container factory] Deploying ESMEGroup

[Container factory] Deploying SMSCGroup

[Container factory] Deploying ServiceGroup

[Container factory] Deploying ESME

[Container factory] Deploying SMSC

[Container factory] Deploying TrafficIdentifier

[Container factory] Deploying Condition

[Container factory] Deploying Rule

[Container factory] Deploying Service

[Container factory] Deploying StatisticMap

[Container factory] Deploying Statistic

[Container factory] Deploying StatisticType

[Container factory] Deploying ClusterAdmin

[Bean Cache] Cache policy scheduler started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[ContainerManagement] Initializing

[ContainerManagement] Initialized

[ContainerManagement] Starting

[ContainerManagement] Started

[Container factory] Deployed application:
file:/C:/repository/external/appserver/jboss/tmp/deploy/Default/manager.
ear

[J2EE Deployer Default] Starting module manager.war

[Jetty] Registered Jetty:Jetty=0,context=/nexus,WebApplicationContext=0

[Jetty] Started SetupHandler in
WebApplicationContext[/nexus,file:/C:/repository/external/appserver/jbos
s/tmp/deploy/Default/manager.ear/web1001/]

[Jetty] Started SecurityHandler in
WebApplicationContext[/nexus,file:/C:/repository/external/appserver/jbos
s/tmp/deploy/Default/manager.ear/web1001/]

[Jetty] Started ServletHandler in
WebApplicationContext[/nexus,file:/C:/repository/external/appserver/jbos
s/tmp/deploy/Default/manager.ear/web1001/]

[Jetty] JSP: init

[Jetty] Started WebInfProtect

[Jetty] ResourceHandler started in
file:/C:/repository/external/appserver/jboss/tmp/deploy/Default/manager.
ear/web1001/

[Jetty] Started ResourceHandler in
WebApplicationContext[/nexus,file:/C:/repository/external/appserver/jbos
s/tmp/deploy/Default/manager.ear/web1001/]

[Jetty] Stopped SetupHandler in
WebApplicationContext[/nexus,file:/C:/repository/external/appserver/jbos
s/tmp/deploy/Default/manager.ear/web1001/]

[Jetty] Destroyed SetupHandler in null

[Jetty] successfully deployed
file:/C:/repository/external/appserver/jboss/tmp/deploy/Default/manager.
ear/web1001/ to /nexus/*

[J2EE Deployer Default] J2EE application:
file:/C:/repository/external/appserver/jboss/deploy/manager.ear is
deployed.

 

 

Good luck..

Dorothy


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message