jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev" <paranoia...@gmail.com>
Subject Re: urgent help needed -to run cactus on jboss-4.2.0
Date Sat, 28 Jun 2008 18:54:01 GMT
Hi Daniel,

my tests does not require user authentication, but I will
try to use one and see if you are right.

Thanks, Petar.

2008/6/28, Daniel Lipofsky <Daniel.Lipofsky@bricsnet.com>:
>
> Petar, does your app require user authentication?
> Authentication was the problem that required me to hack
> cactus 1.7.2 on JBoss 4.2.2 (this was before 1.8.0).
> I believe I tried an unhacked 1.8.0 and it didn't work
> for me either, although I wasn't using the cargo integration
> like you show below.
>
> Thanks,
> Dan
>
>
> > -----Original Message-----
> > From: Petar Tahchiev [mailto:paranoiabla@gmail.com]
> > Sent: Friday, June 27, 2008 4:08 AM
> >
> > HI guys,
> >
> > I am really amazed that no-one uses Cactus 1.8.0, since it offers so
> > many facilitation!
> > I use no hacks at all, and I am still able to start, deploy, execute
> > the tests in, and stop JBoss 4.2.2.
> > I use Cactus 1.8.0 with the Cargo Integration.  Here is a snippet from
> > my build.xml (this actually is the ejb
> > samples module that comes with Cactus):
> >
> >     <target name="test" depends="cactifyear">
> >       <echo>Please take a deep breath while Cargo gets JBoss for
> > running the
> > sample ejb tests...</echo>
> >         <cactus earfile="${cactified.ejb.archive.name}"
> >             printsummary="yes">
> >             <classpath>
> >                 <path refid="cactus.classpath"/>
> >                 <pathelement location="${build.dir}"/>
> >                 <pathelement location="${cactus.build.dir}"/>
> >                 <pathelement location="${basedir}/cactus"/>
> >                 <pathelement path="src/main/app"/>
> >                 <pathelement location="${basedir}/cactus.properties"/>
> >                 <path refid="jboss.client"/>
> >             </classpath>
> >             <containerset>
> >                 <cargo containerId="${jboss.container.id}"
> > output="${logs.dir}/output.log" log="${logs.dir}/cargo.log"
> > home="/home/peter/bin/jboss/jboss-4.2.2.GA" action="start">
> >                     <configuration>
> >                         <property name="cargo.servlet.port"
> > value="${cargo.servlet.port}"/>
> >                         <property name="cargo.logging"
> > value="${cargo.logging}"/>
> >                         <deployable
> > type="${cactus.sample.archive.type}"
> > file="${cactified.ejb.archive.name}"/>
> >
> >                     </configuration>
> >                 </cargo>
> >             </containerset>
> >             <sysproperty key="cactus.jndi.initialContextFactory"
> > value="org.jnp.interfaces.NamingContextFactory"/>
> >             <sysproperty key="cactus.jndi.providerUrl"
> > value="jnp://localhost:1099"/>
> >             <sysproperty key="cactus.jndi.securityPrincipal"
> > value="system"/>
> >             <sysproperty key="cactus.jndi.securityCredentials"
> > value="jboss"/>
> >             <sysproperty key="cactus.jndi.urlPkgPrefixes"
> > value="org.jboss.naming.client"/>
> >
> >             <!--sysproperty key="java.naming.factory.initial"
> > value="org.jnp.interfaces.NamingContextFactory"/-->
> >
> >             <sysproperty key="cactus.jms.connectionFactoryJndiName"
> > value="java:comp/env/jms/MyConnectionFactory"/>
> >
> >             <formatter type="${cactus.formatter.type}"/>
> >             <batchtest todir="${reports.dir}">
> >                 <fileset dir="${src.dir}">
> >                     <include name="**/Test*.java"/>
> >                 </fileset>
> >             </batchtest>
> >         </cactus>
> >     </target>
> >
> >
> > All you have to do is prepare the archive (cactify it), and change the
> > JBoss
> > home directory.
> > And it is all perfectly documented.
> >
> > I hope I have helped someone.
> >
> > Cheers, Petar.
> >
>
> > > -----Original Message-----
> > > From: Daniel Lipofsky [mailto:Daniel.Lipofsky@bricsnet.com]
> > > Sent: Thursday, June 26, 2008 1:37 PM
> > > To: Cactus Users List
> > > Subject: RE: urgent help needed -to run cactus on jboss-4.2.0
> > >
> > > First off, I was never able to get cactus to run
> > > out of the box on JBoss 4.2.x.  I had to patch it.
> > > You can see my patch at http://danlipofsky.com/technical/cactus/
> > > My cactus tests ran on other app servers (Orion 2.0.7 and
> > > WebSphere 6.0).  They seem to work pretty well on JBoss 4.2.2
> > > with this patch, but it is definitely a hack.
> > >
> > > If anyone has a better way please let me know.
> > >
> > > Here are my ant targets.
> > > It's probably more complex than you need.
> > > Hopefully the vars are self-explanatory.
> > > Don't start or stop the server but does test that it is running.
> > >
> > > <target name="test.cactus.all" depends="init">
> > >     <antcall target="test.cactus.generic">
> > >         <param name="cactus_test_target" value="test.cactus.junit"/>
> > >         <param name="cactus_test_pattern" value="**/*Test.java"/>
> > >     </antcall>
> > > </target>
> > >
> > > <!-- run the Cactus tests (takes ${cactus_test_target} param) -->
> > > <target name="test.cactus.generic" depends="init" description="run
> the Cactus tests on the core module">
> > >
> > >     <echo>test.cactus.generic: target=${cactus_test_target}</echo>
> > >     <echo>cactusContextURL: ${cactusContextURL}</echo>
> > >     <fail unless="cactus_test_target" message="Missing
> > > cactus_test_target parameter"/>
> > >
> > >     <!-- Check if server is running -->
> > >     <delete file="${java.io.tmpdir}/servercheck.txt" />
> > >     <get
> src="${install.frontend_server_protocol}://${install.frontend_server_nam
> e}:${install.frontend_server_port}/ws/"
> > > dest="${java.io.tmpdir}/servercheck.txt" ignoreerrors="yes" />
> > >     <fail message="Cannot connect to
> ${install.frontend_server_protocol}://${install.frontend_server_name}:${
> install.frontend_server_port}/ws/">
> > >
> > >     Start application before running this task.
> > >
> > >         <condition>
> > >             <not>
> > >                 <available file="${java.io.tmpdir}/servercheck.txt"
> />
> > >             </not>
> > >         </condition>
> > >     </fail>
> > >
> > >     <!-- Define the Cactus tasks -->
> > >     <taskdef resource="cactus.tasks">
> > >         <classpath refid="test.jar.path" />
> > >     </taskdef>
> > >
> > >     <runservertests
> > >
> testurl="${cactusContextURL}/ServletTestRunner?Cactus_Service=RUN_TEST"
> > > starttarget="test.server.start.bogus"
> > > stoptarget="test.server.stop.bogus"
> testtarget="${cactus_test_target}" />
> > > </target>
> > >
> > > <target name="test.cactus.junit" depends="init">
> > >
> > >     <echo>test.cactus.junit: pattern=${cactus_test_pattern}</echo>
> > >     <fail unless="cactus_test_target" message="Missing
> > > cactus_test_target parameter"/>
> > >
> > >     <mkdir dir="${test.report.dir}" />
> > >     <junit printsummary="yes" fork="yes">
> > >         <classpath refid="cactus.full.path" />
> > >         <sysproperty key="cactus.contextURL"
> value="${cactusContextURL}" />
> > >         <sysproperty key="test.app.server"
> value="${install.app.server}" />
> > >         <sysproperty key="baseDirectory" value="${install.dir}" />
> > >
> > >         <formatter type="xml" />
> > >
> > >         <batchtest fork="yes" todir="${test.report.dir}">
> > >             <fileset dir="${test.src.web.dir}">
> > >                 <include name="${cactus_test_pattern}" />
> > >                 <exclude name="**/*BaseTest.java" />
> > >             </fileset>
> > >             <fileset dir="${test.generated.java.dir}">
> > >                 <include name="${cactus_test_pattern}" />
> > >             </fileset>
> > >         </batchtest>
> > >     </junit>
> > > </target>
> > >
> > > > -----Original Message-----
> > > > From: SRINIVASAN, KUMARAN [mailto:KUMARAN_SRINIVASAN@intuit.com]
> > > > Sent: Wednesday, June 18, 2008 1:43 PM
> > > >
>
> > > > Hi,
> > > >
> > > >         I want to run cactus test as part of my automation build
> (via
> > > > cruisecontrol  ) using ant  on already running jboss-4.2.0. server
> > > > After completing the cactus test i don't want to stop the
> jboss-4.2.0.
> > > > Please send me the sample ant script code snippet. Cactus test
> should
> > > > not initiate neither start nor stop the server ,it should just run
> the
> > > > test alone on running Jboss-4.2.0
> > > >
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Kumaran
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
>
>


-- 
Regards, Petar!
Karlovo, Bulgaria.
- - - - - - - -
| Author @ Manning Publications.
| Technical Consultant @ HP
| BGJUG-Bulgarian Java User Group Leader.
| Apache Jakarta PMC member.
| Jakarta Cactus Lead Developer.
| Blogger: http://weblogs.java.net/blog/paranoiabla/
- - - - - - - -
Public PGP Key at:
https://keyserver1.pgp.com/vkd/DownloadKey.event?keyid=0x19658550C3110611
Key Fingerprint: A369 A7EE 61BC 93A3 CDFF  55A5 1965 8550 C311 0611

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