Use the eclipselink.target-server
property to configure the ServerPlatform
that will be used to enable
integration with a host container. If this property is not specified, the
runtime will attempt to detect which ServerPlatform
should be used.
If detection fails, Default (TargetServer.None
) will be used.
Using target-server
in persistence.xml
<property name="eclipselink.target-server" value="org.eclipse.persistence.platform.server.tomcat.TomcatPlatform"/>
Using target-server
in a Property Map
import org.eclipse.persistence.config.TargetServer;
import org.eclipse.persistence.config.PersistenceUnitProperties;
import org.eclipse.persistence.platform.server.tomcat.TomcatPlatform;
propertiesMap.put(PersistenceUnitProperties.TARGET_SERVER, TomcatPlatform.class.getName());