You should checkout the FAQs on the hibernate website for this topic.
Generally you should explicitly transfer the data you need to your client in one call via data transfer objects. You may use your EntityBean classes for this. Just make sure all your dependent objects are initialized (walk the tree if in doubt).
Reattaching is a bad idea because you have won't have acid semantics for your objects any more and you do want them (?).
Regards,
-Gunnar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992982#3992982
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992982
"ykrishnaprasad" wrote :
| a) Can get the type of an invocation(whether its a METHOD)?
|
i guess you mean in the interceptor, so yes. just either try to cast it to a MethodInvocation or check if its an instanceof MethodInvocation.
"ykrishnaprasad" wrote :
| b) Can i use org.jboss.aop.joinpoint.MethodCalledByMethodInvocation to see if a method is invoked by another method?
|
i believe you are thinking of cflow here. with cflow you can define a stack of eg. method calls that has to occur before a pointcut matches.
take a look at the cflow examples in the dist and let me know if it solves your problem.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992980#3992980
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992980
What is the difference between injecting an entity into a session bean and instantiating it manually? They both seem like they work, provided that you use the appropriate EntityManager methods, such as persist().
What is the main advantage of using injection versus not?
I also have a question about @In(create=true). Wouldn't you always want create=true? For the first request, wouldn't injection always need to create the nonexistent entity? So I'm getting confused on when you'd want to not have create=true.
Hopefully somebody could please clarify for me. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3992976#3992976
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3992976