I am using JDO in stateless session bean. I have the following code:
-----------------------------------------------------------------------------
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;

try {
Context context = new InitialContext();
Context env = (Context)context.lookup("java:comp/env");
pmf = (PersistenceManagerFactory)env.lookup("jdo/OraclePMF");
}
catch(Throwable e) {
throw new EJBException(e);
}
}

----------------------------------------------------------------------

I don't know how to bind PersistenceManagerFactory in SUN J2EE RI Server. Here is what I want:
1. instantialize a PersistenceManagerFactory object.
2. set driver name for PersistenceManagerFactory.
3. set database url for PersistenceManagerFactory.
4. set user name for PersistenceManagerFactory.
...
5. bind a PersistenceManagerFactory object to JNDI.

Thanks in advance!


Jim