From: Gavin_King/Cirrus%<CI...@ci...> - 2002-08-08 00:36:17
|
>I put the mapping files with the classes in the EJB jar file and fired up >JBoss. I got the following back: > >Embedded Exception Hibernate lazy instantiation problem: Resource: >/com/vetconnect/client/dao/Client.hbm.xml not found; >nested exception is: >javax.ejb.EJBException: null Embedded Exception Hibernate lazy instantiation >problem: Resource: /com/vetconnect/client/dao/Client.hbm.xml not found Damn! I really don't understand why the following line wouldn't work: ds.storeResource( resources[i], Thread.currentThread().getContextClassLoader() ); ( in SessionFactoryStub.getImpl() ). Have I got it totally wrong, or isn't Thread.currentThread.getContextClassLoader() meant to get the classloader used by the calling EJB? Perhaps I'm hallucinating... >The only way I can see making this MBean useful is if users put all their >mapped classes and mappings in the server's classpath. Then they can put >them all in one mapping or split them up and it won't matter because the >MBean and SessionFactoryStub will have access to them. Well, it would work. but seems suboptimal. Theres got to be *some* way for a thread servicing an EJB method call to get hold of the EJB's *own* classloader doesn't there??? >What do you want to do with this? I dunno. |