From: Urberg, J. <ju...@ve...> - 2002-08-07 18:36:41
|
I tried it out again today using each mapping file name as resource. The entry looks like this: <attribute name="MapResources"> /com/vetconnect/client/dao/Client.hbm.xml,/com/vetconnect/client/dao/ClientP hone.hbm.xml </attribute> 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 Unless my understanding about all this class loader stuff is wrong, I don't think this approach is going to work since the SessionFactoryStub in JNDI is running in a seperate class loader and will never be able to see mapping files in EJB jar files. 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. What do you want to do with this? Regards, John -----Original Message----- From: Gavin_King/Cirrus%CI...@ci... [mailto:Gavin_King/Cirrus%CI...@ci...] Sent: Monday, August 05, 2002 8:23 AM To: Urberg, John Cc: hib...@li... Subject: RE: [Hibernate-devel] RE: JMX/JBoss >Is this kind of setup what you created the hibernate.cfg.xml for? Should we >also allow using that file instead of passing in all the information in the >JMX config? exactly. >> Anyway, I think we should support JMX because that seems >> to be the standards-oriented way of doing things like this. >Sounds good. I'll test it out this week. Thanks. Feel free to make whatever improvements.... |