[EJB 3.0] - Re: problem with test invocation of session bean
by kpiis
Sorry for delay with answer.
I have solved my problems with new jems GA installer.
Current functions are working fine now.
But I still have a lot of questions (maybe someone has answers for my stupid questions :))
1. I deploy my app separately in 2 arch - jar with ejb3 components and war with servlets components. There are not any classes of EJB3 jar in war archive (in lib dir or WEB-INF/classes). But when I execute servlet method which invoke or operate with EJB3 POJO or EJB3 Session beans - all is fine!!! I looked in runtime in POJONAME.class.getProtectionDomain().getCodeSource().getLocation(); - and saw that it is loaded for JAR file!
How it can be? I always thought that each module has it's own classloader.
to dmitryak - thank you for help - now I use provided snippet in my code.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008531#4008531
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008531
19 years, 2 months
[JBoss jBPM] - Re: Question about retrieving User Object from ExecutionCont
by crussell42
I tried the following trick (total guess, Not sure it will work but it got me a little further). Seems like this scheme should work to force jbpm to consider the user object as a hibernatable object...which mine is only not because of hibernate.cfg.xml
jbpm.varmapping.xml
| <jbpm-type>
| <matcher>
| <bean class="org.jbpm.context.exe.matcher.ClassNameMatcher">
| <field name="className"><string value="foo.MyFooClass" /></field>
| </bean>
| </matcher>
| <variable-instance class="org.jbpm.context.exe.variableinstance.HibernateLongInstance" />
| </jbpm-type>
|
This now causes me to get a
| org.hibernate.MappingException: Unknown entity: foo.MyFooClass
|
So I guess I somehow need to get MyFooClass into the classloader path of the jbpm-enterprise.ear I am deploying....Any thoughts appreciated.
This tends to make me believe that at least jbpm is trying to treat my Entity as a hibernatable object. However, I just use the javax.persistence and annotations so I dont have a hibernate.cfg.xml in my ejb3 / pojo foo.jar.
I guess I dont know what the HibernateLongIdMatcher really does. Seems it would use introspection and look for an org.hibernate.annotations.Id? -or- Entity. Or does it just look for a match of the class name in some hibernate.cfg.xml that it finds?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008525#4008525
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008525
19 years, 2 months