Hanging JUnit test: Solved 
In a finally I *thought* I was closing statements and connections.  Doing some 
searching, I found something about calling commit on my connection because of 
how Derby defaults it's cursor states.  I'm doing read only stuff, so didn't 
think commit was necessary.  However, calling commit then close has caused the 
hanging JUnit tests problem to go away.

Using the no-arg InitialContext constructor once OpenEJB has been embedded: 
Solved.

To embed OpenEBJ, I have this.
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.client.LocalInitialContextFactory");

Once OpenEJB has been embedded, I also had to set the system property so the 
no-arg constructor would also work.
System.setProperty(Context.INITIAL_CONTEXT_FACTORY, 
"org.apache.openejb.client.LocalInitialContextFactory");


One last problem I'd appreciate your help one, or even a pointer to some 
documentation.  I've googled but not finding what I'm looking for.  Prior to 
integrating OpenEJB, I have configured my EBJ stuff in my web.xml file.  
Introducing the ebj-jar.xml file has caused JBoss problems, it looks like when 
it's parsing the web.xml, because the first ejb-local-ref in my file results in 
an exception being thrown.  If I move entries around in the file, the first 
entry will cause JBoss to report an exception.  The final result being a 
message 
that my deployment is in error.  An example of my web.xml entry follows:

    <ejb-local-ref>
        <ejb-ref-name>OfficeListFacade</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        
<local>com.dstsystems.walletshare.ejb.facade.OfficeListFacadeLocal</local>
        <ejb-link>WalletShare-ejb.jar#OfficeListFacade</ejb-link>
    </ejb-local-ref>

- Can web.xml and ejb-jar.xml config work together
- Do you have an example or can point me to where I can find that.
- Even just the empty <ejb-jar/> tag in the ejb-jar.xml file makes JBoss fail.

Any pointers on this would be greatly appreciated.

TT

Reply via email to