Home > Object Persistency API > API Reference > Obtain a Session
The EOContainer interface provides the ability to obtain a session context.
package org.oomega.persistence; public interface EOContainer { public EOContainerSession getSession() throws AuthenticationException; public EOContainerSession getSession(String user, String password) throws AuthenticationException; }
The getSession() method is a shortcut that obtains a session with the public user and is identical to the following method call: getSession("public", "").
Next chapter: Login and Logout