[EJB 3.0] - Re: Using EntityManager in a abstract super class
by skajotde
"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
15 years, 7 months
[JBoss Cache: Core Edition] - Reloading an invalidated entry
by nathanmesser
I've been trying to setup JBoss cache to use invalidation in a cluster.
I'm handling the re-reading of the entry from the database myself, however I'm not sure how to put the entry in the cache.
The issue is when Cache instance A has sent out an invalidation message, and Cache instance B is now trying to access that entry, and has found it empty.
If I use node.put, another invalidation message is sent out across the cluster.
However if I use cache.putForExternalRead, and the node referenced by the FQN already exists, which in my case it usually does, no action is taken.
What's the correct approach here?
Am I using the node structure correctly? I'm using a node for each type of object, so a node will be used to store multiple objects, and each object will be read and update, and therefored invalidated, individually, not at the node level.
Regards,
-Nathan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4185972#4185972
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4185972
15 years, 7 months