Use eclipselink.session-name
to configure a unique name to use when storing the singleton server session within the SessionManager
.
Values
Table 5-87 describes this persistence property's values.
Table 5-87 Valid Values for session.name
Value | Description |
---|---|
Name |
Unique session name to use instead of the default, EclipseLink-generated session name. |
Usage
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.
Examples
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: