Java Persistence API (JPA) Extensions Reference for EclipseLink, Release 2.4
  Go To Table Of Contents


Use eclipselink.session-name to configure a unique name to use when storing the singleton server session within the SessionManager.


Table 5-87 describes this persistence property's values.

Table 5-87 Valid Values for

Value Description


Unique session name to use instead of the default, EclipseLink-generated session name.


By default, EclipseLink generates a unique session name. You can provide a custom, unique, session name with this property.

When using a sessions-xml file, you must include this session name as the name of the session in the sessions-xml file.


Example 5-89 shows how to use this property in the persistence.xml file.

Example 5-89 Using session-name in persistence.xml

<property name="eclipselink.session-name" value="MySession"/>

Example 5-90 shows how to use this property in a property map.

Example 5-90 Using session-name in a Property Map

import org.eclipse.persistence.config.PersistenceUnitProperties;
propertiesMap.put(PersistenceUnitProperties.SESSION_NAME, "MySession");

See Also

For more information, see: