2007/5/23, Guillaume Carré <[EMAIL PROTECTED]>:
if your SessionFactory is injected in your action, and all your
actions extend "AbstractAction" for example, that has a
getSessionFactory() method, you can do this:

public String intercept(ActionInvocation invocation) throws Exception {
    Action action = (Action) invocation.getAction();
    if (action instanceof AbstractAction) {
        sessionFactory = ((AbstractAction) action).getSessionFactory();
...
}

The actions are unaware of any Hibernate type.  This is mandatory
since I don't want my actions to depend on a specific persistence
mechanism.  They only see DAO interfaces (which are also not dependent
on any persistence mechanism).

Thanks,

Célio.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to