> 
> On 2001.11.19 12:28:58 -0500 Dain Sundstrom wrote:
> > > 
> > > As if your life isn't hard enough...;-)
> > 
> > :)
> > 
> > > I'm going to start looking at extending the CMP 2 code to 
> > > work with CCI
> > > resource adapters as well as jca-jdbc drivers. (the aim is to 
> > > use EJB 2
> > > with an object database, for which there is a CCI connector.)
> > 
> > I have been thinking about a new cmp 2 extension that maps to stored
> > procedures.  Would that be similar? 
> 
> I think a case could be made for using something like the CCI - jdbc -
> blackbox jca wrapper for this, where basically the sp's are 
> kept in the
> InteractionSpecs.  In other words I'd suggest using the CCI 
> interface I am
> proposing for sps as well.

Ok I think I am following what your are saying.  I have been thinking about
this for a while.  I think is a simplified version of JDBC because there
couldn't be any statement (sql) code generation, but it is also harder
because everything must be specified.  Am I correct here?  Is it true that
nothing could be generated?  If so that is what I was thinking of.
 
> > 
> > > My initial impression is that I will have to implement all 
> > > the classes in
> > > ejb/plugins/cmp/jdbc/** in a new ejb/plugins/cmp/cci/** (for 
> > > starters).  Is
> > > this anywhere near the right track? Any clues about what else 
> > > I will need?
> > 
> > Well, not exactly.  ejb/plugins/cmp/jdbc/** is an implementation of
> > ejb/plugins/cmp/**, but may be a good stating place.  One 
> issue I see, is
> > that I plan on changing this somewhat to support database
> > INSERT/DELETE/SYNC
> > timing and ordering.
> > 
> > The most important packages to investigate are the bridge 
> packages.  The
> > bridge packages implements the bridge pattern.  The bridge 
> is between
> > entity
> > implementation accessors and cmp-field/cmr-field/query objects.
> 
> So this would be in .../cmp/cci/bridge?  

Yes

> Don't I need the cmp/cci analogues of cmp/jdbc also? 

Yes. The point I am making is that org.jboss.ejb.plugins.cmp.jdbc is an
implementation of the interfaces defined in org.jboss.ejb.plugins.cmp.  The
jdbc package would be a good example.
 
> > > [I am hoping that the results of this work will be donated to 
> > > JBoss, but
> > > cannot guarantee this]
> > > 
> > > Also, would it be OK if I converted the sample app and tests 
> > > you sent me to
> > > fit in the jboss testsuite and committed them?
> > 
> > I have a much more detailed set of test cases, that I would 
> like to add.
> > I'm not really sure how the test system works, so maybe you 
> can send me
> > some
> > pointers.  
> 
> If you'd like I would be happy to do this to get more 
> oriented.  If you
> want to...

Cool, I'll clean them up a little and send them to you later today (unless I
am side tracked).
 
> Lets say you put it in .../test/cmp2/.
> 
> Test cases go in .../test/cmp2/test. They should be named
> *UnitTestCase.java or *StressTestCase.java. They should descend from
> JBossTestCase.
> 
> Typically you will have an application to test, say 
> Example.ear.  Assuming
> you want to deploy it for a whole TestCase class worth of 
> tests (rather
> than un/redeploy it between tests), use a JBossTestSetup like 
> this in your
> testcase:
> 
>    public static Test suite() throws Exception
>    {
>       return getJ2eeSetup(MyCMP2UnitTestCase.class, "Example.ear");
>    }
> 
> This will deploy Example.ear once before any tests from 
> MyCMP2UnitTestCase
> and undeploy it after all are complete.
> 
> Put the bean classes in .../test/cmp2/bean (or .../ejb), 
> interfaces (if not
> xdoclet-generated) in .../test/cmp2/interfaces
> 
> Put ejb-jar.xml and other config files in .../src/resources/cmp2/....
> 
> Put instructions for building the ears in the build.xml, it 
> should end up
> in output/lib. As far as I am concerned you don't need to package the
> */test/*TestCase code, although it may be getting jarred up anyway. 
> Personally I am only interested in running tests from ant, 
> where the test
> class files work fine.
> 
> Tests named *UnitTestCase will be run from the tests-unit 
> target.  You can
> run all cmp2 tests with -Dtest=cmp2 test or one test class with
> -Dtest=MyCMP2UnitTestCase one-test.
> 
> Thanks!
> 
> david jencks

These are great instructions.  I'm going to save these off for when I get to
writing some more tests.

-dain

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

Reply via email to