jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kristoffer Sjögren (HF/EAB) <kristoffer.sjog...@ericsson.com>
Subject RE: weblogic forceshutdown
Date Thu, 29 Apr 2004 13:53:00 GMT
Well, i must be able to startup a server, deploy and afterwards shutdown in order to automate
testing. To do this i have a cactus task to automate this.

<target name="ear-cactify" depends="build-cactus-tests, ear">
     <taskdef resource="cactus.tasks">
        <classpath>
        <pathelement location="lib/test/aspectjrt.jar"/>
        <pathelement location="lib/test/cactus-1.5.jar"/>
        <pathelement location="lib/test/commons-httpclient-2.0-rc1.jar"/>
        <pathelement location="lib/test/cactus-ant-1.5.jar"/>	
        <pathelement location="lib/common/commons-logging.jar"/>
	</classpath>
	</taskdef>
    
	<cactifywar version="2.3" destfile="build/cactus.war"
      	mergewebxml="metainfo/cactus/web.xml">
			<webinf dir="metainfo/cactus">
				<!-- This goes in automatically -->
				<exclude name="web.xml"/>
				<!-- Should not be here -->
				<exclude name="application.xml"/>
			</webinf>
			<fileset dir="web" includes="cactus-report.xsl"/>
		<classes dir="${cactus.classes.dir}" />
	</cactifywar>

	<ear update="true" destfile="build/${project}.ear"
		appxml="metainfo/cactus/application.xml">
		<metainf dir="metainfo/cactus" includes="weblogic-application.xml" />
		<fileset dir="build">
			<include name="cactus.war"/>
		</fileset>
	</ear>
</target>

<target name="test-cactus" depends="ear-cactify">


	<cactus earfile="build/${project}.ear" fork="yes" 
		printsummary="yes" haltonerror="true" 
		haltonfailure="true">
		<containerset>
			<weblogic7x dir="${cactus.home.bea81}" configxml="config.xml"
				output="weblogicresult.txt" tmpdir="c:/test"/>
		</containerset>
		
		<formatter type="brief" usefile="false"/>
		<test name="se.connector.spi.CactusTestConnectionFactory"/>
		<classpath>
			<pathelement location="${cactus.classes.dir}"/>
			<pathelement location="${resource.classes.dir}"/>
		</classpath>
	</cactus>
</target>	


And, as i said, it wont eat up the "configxml" tag... i have tried running test from pure
dos and from eclipse but none of them work. I use ant 1.6.1 and cactus 1.5 ...

regards,
-Kristoffer


> -----Original Message-----
> From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
> Sent: den 29 april 2004 13:31
> To: Cactus Users List
> Subject: RE: weblogic forceshutdown
> 
> 
> Kristoffer,
> 
> I'm running cactus tests in wls 8.1 and have no troubles 
> getting the server to use _my_ config.xml.  When I run my 
> cactus tests, I assume the server is running and components 
> are deployed.  If you could send more details about how you 
> are running your tests, it would be more helpfull to help diagnose.  
> 
> I recall the old eclipse plugin would use it's own cactus 
> only domain for running tests.
> 
> ~mark
> > -----Original Message-----
> > From: Kristoffer Sjögren (HF/EAB)
> > [mailto:kristoffer.sjogren@ericsson.com]
> > Sent: Thursday, April 29, 2004 4:05 AM
> > To: 'Cactus Users List'
> > Subject: RE: weblogic forceshutdown
> > 
> > 
> > Hmmm ... seems like the changes gets reverted even though i 
> > go through the console of weblogic. I tried to change the 
> > config.xml for another standalone instance of weblogic and 
> > the changes did not get reverted. So, could it be that cactus 
> > creates a new configuration for every test that's being run?  
> > If so is there a way to use an existing configuration? I have 
> > tried the configxml attribute but i get an error:
> > 
> > [cactus] BUILD FAILED: 
> > M:\nrg4_dev_ekrisjo\nrg_ws\dev\Connector\Common\build.xml:135:
> >  Class 
> > org.apache.cactus.integration.ant.container.weblogic.WebLogic7
> > xContainer doesn't support the "configxml" attribute.
> > 
> > build.xml:
> > 
> > <containerset>
> > 	<weblogic7x dir="C:/bea/weblogic81" configxml="config.xml"
> > 		output="weblogicresult.txt" tmpdir="c:/ws-testserver"/>
> > </containerset>
> > 
> > 
> > regards,
> > -Kristoffer
> > 
> > > -----Original Message-----
> > > From: Kristoffer Sjögren (HF/EAB) 
> > > Sent: den 29 april 2004 09:35
> > > To: 'Cactus Users List'
> > > Subject: RE: weblogic forceshutdown
> > > 
> > > 
> > > Hi,
> > > 
> > > Thank you. It worked. I also found another attribute called 
> > > "GracefulShutdownTimeout" where you can fill in how many 
> > > seconds server should wait before doing a FORCESHUTDOWN (0 is 
> > > infinite).
> > > 
> > > This might be off topic, but i could not just edit config.xml 
> > > to add those attributes (server would revert the changes, 
> > > even though server was shutdown). Only way was through the 
> > > console. Is there a way to edit the config.xml manually? 
> > > 
> > > reagrds
> > > -Kristoffer
> > > 
> > > > -----Original Message-----
> > > > From: Mark Lybarger [mailto:Mark.Lybarger@CBC-Companies.com]
> > > > Sent: den 28 april 2004 17:05
> > > > To: Cactus Users List
> > > > Subject: RE: weblogic forceshutdown
> > > > 
> > > > 
> > > > Kristoffer,
> > > > 
> > > > There's a setting for the weblogic server so that it ignores 
> > > > active sessions when shutting down.  this lets you use the 
> > > > SHUTDOWN without waiting a long time.  Here's an excerpt from 
> > > > my config.xml.  I think there's some button you can click on 
> > > > in the console to get this, not sure what that is.
> > > > 
> > > > <Domain ConfigurationVersion="8.1.0.0" Name="myserver">
> > > >     <Server IgnoreSessionsDuringShutdown="true"
> > > >         ListenAddress="localhost" ListenPort="7001"
> > > > ...
> > > > 
> > > > > -----Original Message-----
> > > > > From: Kristoffer Sjögren (HF/EAB)
> > > > > [mailto:kristoffer.sjogren@ericsson.com]
> > > > > Sent: Wednesday, April 28, 2004 7:42 AM
> > > > > To: 'Cactus Users List'
> > > > > Subject: RE: weblogic forceshutdown
> > > > > 
> > > > > 
> > > > > Thanks for the quick answer!
> > > > > 
> > > > > Checked the weblogic docs and changing SHUTDOWN to 
> > > > > FORCESHUTDOWN should work.
> > > > > 
> > > > > How do i apply your patch to my cactus distrubution?
> > > > > 
> > > > > regards,
> > > > > Kristoffer
> > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Vincent Massol [mailto:vmassol@pivolis.com]
> > > > > > Sent: den 28 april 2004 12:32
> > > > > > To: 'Cactus Users List'
> > > > > > Subject: RE: weblogic forceshutdown
> > > > > > 
> > > > > > 
> > > > > > Hi Kristoffer,
> > > > > > 
> > > > > > Thanks for the praise (always appreciated!).
> > > > > > 
> > > > > > For wl7.x shutdown, here's what we use:
> > > > > > 
> > > > > >     public final void shutDown()
> > > > > >     {
> > > > > >         Java java = createJavaForShutDown();
> > > > > >             
> > > > > >         File serverDir = new File(this.dir, "server");
> > > > > > 
> > > > > >         Path classpath = java.createClasspath();
> > > > > >         classpath.createPathElement().setLocation(
> > > > > >             new File(serverDir, "lib/weblogic_sp.jar"));
> > > > > >         classpath.createPathElement().setLocation(
> > > > > >             new File(serverDir, "lib/weblogic.jar"));
> > > > > > 
> > > > > >         java.setClassname("weblogic.Admin");
> > > > > >         java.createArg().setValue("-url");
> > > > > >         java.createArg().setValue("t3://localhost:" + 
> > > getPort());
> > > > > >         java.createArg().setValue("-username");
> > > > > >         java.createArg().setValue("weblogic");
> > > > > >         java.createArg().setValue("-password");
> > > > > >         java.createArg().setValue("weblogic");
> > > > > >         java.createArg().setValue("SHUTDOWN");
> > > > > >         java.execute();
> > > > > >     }
> > > > > > 
> > > > > > If you can provide a patch to force the shutdown, I'll be 
> > > > > > happy to apply
> > > > > > it. I don't think we need 2 ways to stop WL7.x. Always 
> > > > > using the force
> > > > > > shutdown should be ok.
> > > > > > 
> > > > > > Thanks
> > > > > > -Vincent
> > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Kristoffer Sjögren (HF/EAB)
> > > > > > [mailto:kristoffer.sjogren@ericsson.com]
> > > > > > > Sent: 28 April 2004 09:54
> > > > > > > To: 'cactus-user@jakarta.apache.org'
> > > > > > > Subject: weblogic forceshutdown
> > > > > > > 
> > > > > > > Hi,
> > > > > > > 
> > > > > > > First i would like to thank all of those contributing to

> > > > > this great
> > > > > > > testing framework, it really helped me alot in many ways.

> > > > > > Keep up the
> > > > > > good
> > > > > > > work!
> > > > > > > 
> > > > > > > To my problem, the <cactus> task, more specific 
> > > <weblogic7x>. My
> > > > > > problem
> > > > > > > is that when all tests are finished, cactus tries to do

> > > > a graceful
> > > > > > > shutdown of weblogic. Problem with this is that 
> it takes an 
> > > > > > awful lot
> > > > > > of
> > > > > > > time for it to clean up sessions and wait for 
> other stuff to
> > > > > > > finish/invalidate. So i would like to have it to do a 
> > > > > > forceshutdown of
> > > > > > > weblogic since im not really intrested if some sessions

> > > > > > etc. get lost
> > > > > > when
> > > > > > > all tests are finished. Is it possible to do this 
> > from cactus?
> > > > > > > 
> > > > > > > regards,
> > > > > > > Kristoffer
> > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: 
> > > > cactus-user-unsubscribe@jakarta.apache.org
> > > > > > > For additional commands, e-mail: 
> > > > > cactus-user-help@jakarta.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: 
> > > cactus-user-unsubscribe@jakarta.apache.org
> > > > > > For additional commands, e-mail: 
> > > > cactus-user-help@jakarta.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: 
> > cactus-user-unsubscribe@jakarta.apache.org
> > > > > For additional commands, e-mail: 
> > > cactus-user-help@jakarta.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > 
> > > > 
> > > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: 
> cactus-user-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail: 
> > cactus-user-help@jakarta.apache.org
> > > > 
> > > 
> > > 
> > 
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: 
> cactus-user-help@jakarta.apache.org
> > > 
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> > 
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 

Mime
View raw message