persistence@glassfish.java.net

what is the use of defaultSession?

From: Sanjeeb Kumar Sahoo <Sanjeeb.Sahoo_at_Sun.COM>
Date: Fri, 25 Aug 2006 21:50:59 +0530

Hi,

SessionManager has a field called defaultSession defined as shown below:

public class SessionManager {
    ...
    protected AbstractSession defaultSession;
    ...
}

This gets initialized on demand by some code that looks like this:
    public Session getDefaultSession() {
        if (defaultSession == null) {
            defaultSession = getSession("default");
        }
        return defaultSession;
    }

What is the use of this defaultSession? Is it documented anywhere? Will
it interfere with user's persistence unit named as *default*?

Thanks,
Sahoo