[jboss-user] [EJB 3.0] - Re: Using EntityManager in a abstract super class
skajotde
do-not-reply at jboss.com
Fri Oct 31 06:51:06 EDT 2008
"mnrz" wrote : I don't like this sort of approaches but we had to :)
|
| I think it's very useful if they provide an annotation for injections with local JNDi names
|
Why ? ;> It is point of inheritance. Write noninvasive generalization which model one aspect of system, and every class can specyfy to its needs. Contract is only EntityManager, not JNDI. I avoid Jndi if I can, in OO objects should have contract betwen themselves not between object and global register like JNDI.
You DAO even didnt have inherit GeneralDataAccessManipulator, may have:
@PersistenceContext(name="systemXPU")
private EntityManager entityManager;
property dataManipulatorSystemX = new GeneralDataAccessManipulator(enityiyManager);
Also I'm also pro named PU. Every @PersitenceContext should have name.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185975#4185975
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185975
More information about the jboss-user
mailing list