This is already in use in the testsuite. I'm not sure what you mean by
automate this.  I could write an ant task that adds the code and SLSB to an
existing ejb-jar.  I'm not sure how hard it is, but that has not stopped me
before.

-dain

> -----Original Message-----
> From: marc fleury [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 20, 2001 1:04 PM
> To: Dain Sundstrom; 'David Jencks';
> [EMAIL PROTECTED]
> Subject: RE: [JBoss-dev] Re: Testing Local EJBObject?
> 
> 
> dain can you automate that and commit the stuff in the 
> testsuite packages or
> is there a problem with this?
> 
> thakns
> 
> |-----Original Message-----
> |From: [EMAIL PROTECTED]
> |[mailto:[EMAIL PROTECTED]]On 
> Behalf Of Dain
> |Sundstrom
> |Sent: Thursday, December 20, 2001 1:43 PM
> |To: 'David Jencks'; [EMAIL PROTECTED]
> |Subject: RE: [JBoss-dev] Re: Testing Local EJBObject?
> |
> |
> |If you are interested in JunitEJB test extension, a quick 
> doc follows.
> |
> |My extension. JunitEJB, was designed to test local 
> interfaces. Instead of
> |running the test code on the client, the client invokes a SLSB,
> |which intern
> |invokes the test on the server.
> |
> |IMHO my test extension is very easy to use.  Just switch 
> your test case to
> |extend EJBTestCase instead of TestCase.  Then you can add 
> the setUpEJB and
> |tearDownEJB methods, which work like the standard setUp and
> |tearDown methods
> |except they run in different transactions.
> |
> |The difficult part of JunitEJB is packaging, which is the 
> same problem with
> |you have with any EJB class library.  The easiest solution and the
> |one I use
> |is to integrate all the code into one jar.  You need to add 
> the JunitEJB
> |SLSB to your ejb-jar.xml file.  The xml follows:
> |
> |<session>
> |   <description>JUnit Session Bean Test Runner</description>
> |   <ejb-name>EJBTestRunnerEJB</ejb-name>
> |   <home>net.sourceforge.junitejb.EJBTestRunnerHome</home>
> |   <remote>net.sourceforge.junitejb.EJBTestRunner</remote>
> |   <ejb-class>net.sourceforge.junitejb.EJBTestRunnerBean</ejb-class>
> |   <session-type>Stateless</session-type>
> |   <transaction-type>Bean</transaction-type>
> |</session>
> |
> |Then the ant file need to integrate all the jars. A sample ant task
> |declaration follows:
> |
> |    <!-- build cmp2-readonly.jar -->
> |    <jar jarfile="${build.lib}/cmp2-readonly.jar">
> |      <fileset dir="${build.classes}">
> |       <patternset refid="common.test.client.classes"/>
> |       <include name="org/jboss/test/cmp2/readonly/**"/>
> |      </fileset>
> |      <fileset dir="${build.resources}/cmp2/readonly">
> |       <include name="**/*.*"/>
> |      </fileset>
> |      <zipfileset src="${junitejb.junitejb.lib}/junitejb.jar"
> |        includes="net/**/*.*"/>
> |      <zipfileset src="${junit.junit.lib}/junit.jar"
> |        includes="junit/**/*.*"/>
> |    </jar>
> |
> |-dain
> |> -----Original Message-----
> |> From: David Jencks [mailto:[EMAIL PROTECTED]]
> |> Sent: Wednesday, December 19, 2001 5:00 PM
> |> To: [EMAIL PROTECTED]
> |> Subject: [JBoss-dev] Re: Testing Local EJBObject?
> |>
> |>
> |> The tests that use this are in cmp2, and use Dain's ejbjunit
> |> junit extension project.  I don't know much else about this,
> |> though, you might need to ask Dain.
> |> 
> ______________________________________________________________________
> |> View this jboss-dev thread in the online forums:
> |> http://jboss.org/forums/thread.jsp?forum=66&thread=6037
> |>
> |> _______________________________________________
> |> Jboss-development mailing list
> |> [EMAIL PROTECTED]
> |> https://lists.sourceforge.net/lists/listinfo/jboss-development
> |>
> |
> |_______________________________________________
> |Jboss-development mailing list
> |[EMAIL PROTECTED]
> |https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to