On Thu, Sep 02, 2004 at 04:53:21PM -0400, Mark Lybarger wrote: > Thanks for the response! > > Jacek Laskowski wrote: > > >Mark Lybarger wrote: > > > >>yeah! i've got openejb working now doing intravm testing on a simple > >>stateless session bean which uses a datasource. very cool stuff. > > > > > >Hi, > > > >Excellent! Would you show us the configuration files? How long did it > >take? Do you think there're areas to improve? Which ones? > > the test takes 9 seconds to run according to ant. that's running one > test case, creating a few tables in axion, and deploying 15 or so slsb's > into openejb. i may be able to share the config, but it's not that > complicated really. that work is all on my work machine and i haven't > been able to sub to the mailing list from there yet. i tried a couple > weeks back but it didn't seem to go through.
If you send me the address you want subscribed, I can get you on the list. > i'm not too familiar with integrating other "data sources" just yet in > with openejb, but we're using a tuxedo connector from within weblogic to > call out to an external tuxedo service. it would be nice to have > documentation on how to setup this type of thing. for testing, we'd > probably want to stub/mock out the actual service, but in a way to not > touch the code/dd just to test. OpenEJB 1 can use any JCA 1.0 connector, so this is something that could be done with a little work. > our app also turns auto commit off for db connections every time it gets > one from the data source. this of course was an issue using openejb as > it throws a not implemented exception there. i patched the code to just > not throw that exception and was on my way. i'm not really familiar > with why our code base does this (performance benefits maybe i dunno), > but again, i'd like to minimize touching the code base. Mangling with your datasources probably isn't a good idea. If you are using weblogic I would be surprised if they even act on that--seems like something a smart vendor would ignore. A compliant way to approach the issue would be to use bean-managed transactions from your SLSBs and just mark your transactional boundaries with the UserTransaction object. A call to userTransaction.begin() should ensure that any connections you get from the DataSource are already set at autocommit false. > > > > > > >>with intravm, is a remote lookup like this possible? > > > > > >I wouldn't expect any troubles there. Should work smothly (unless > >there's a bug :)). > > i may have been unclear, i would like the bean under test to be able to > do a lookup on another bean deployed also within the same openejb > instance. i would like to minimize the coding changes required to > existing beans just to be able to test them more quickly. we seem to > have side stepped the spec in a few areas which seems to bite us when we > least expect it. If you have a bean that wants to grab another bean and it isn't using ejb-refs in the deployment descriptor, you can grab an initial context using the org.openejb.client.LocalInitialContextFactory and lookup the bean using its ejb-name. This is not compliant, of course. -David
