Hey guys,
got a question. I found the following code-snippte in JBoss Docs:
Code:
import org.hibernate.Query;
import org.hibernate.Session;
@Stateless
@Remote(CustomerRemote.class)
@RemoteBinding(jndiBinding = "CustBean")
public class CustomerBean implements CustomerRemote
{
@PersistenceContext
private Session session;
So is the injection of Session over @PersistenceContext only on JBoss AS possible or in other AS like SAP NetWeaver, too ?
I'm asking, because i got an application that I have to migrate from Spring to EJB3. The application uses "getHibernateTemplate().findByCriteria(crit);" to execute an query, but HibernateTemplate is a Spring-Interface. So my problem is how to get the Session to execute the criteria.
Thanks in advance for any hints
hehi