> I guess you are refering to the HibernateTutorial
> [1] on the wiki?

Yes it was that one.

> Looking at the 
> AbstractDatabaseAction and the DatabaseAddAction it
> seems they are doing 
> sort of the same as described on the Hibernate wiki
> page, except not 
> with hibernate indeed.

It has been easy. I saw that database actions extends
other Actions than AbstractAction so looking the
hierarchy I think that the most appropiate for me was
the ConfigurableServiceableAction.

Making my action extends that one, I had access to the
ServiceManager so i can get the PersistenceFactory and
use like it like this:

PersistenceFactory pf = (PersistenceFactory) 
    manager.lookup(PersistenceFactory.ROLE);
Session hs = pf.createSession();
Collection c =
hs.createCriteria(MyClass.class).list();
hs.close();

And it works.

Thx.



                
______________________________________________ 
LLama Gratis a cualquier PC del Mundo. 
Llamadas a fijos y móviles desde 1 céntimo por minuto. 
http://es.voice.yahoo.com

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

Reply via email to