Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-users] DatabaseException jdbc4.CommunicationsException - try SessionCustomizer

	Hi, If you need to do something in JPA that does not have a property available - try a SessionCustomer and put the custome example java code you mentioned into this class.

	See the following JPA example where we had to change the lookupType on the JNDI connector to STRING_LOOKUP instead of Composite.

persistence.xml property:

	<property name="eclipselink.session.customizer" value="org.eclipse.persistence.example.unified.integration.JPAEclipseLinkSessionCustomizer"/>

Your Customizer:

	import org.eclipse.persistence.internal.sessions.factories.SessionCustomizer;
	public class JPAEclipseLinkSessionCustomizer implements SessionCustomizer {
		public void customize(Session session) throws Exception {

	thank you

-----Original Message-----
From: Mathias Walter []
Sent: Thursday, June 26, 2008 10:08 AM
To: EclipseLink User Discussions
Subject: [eclipselink-users] DatabaseException


how can I configure EclipseLink (with persistence.xml) to automatically
reconnect to the database after a CommunicationsException?

I've used autoReconnect=true at the JDBC connection string, but it does not

Unfortunately, the EclipseLink documentation explains only how to set this
with the Workbench or Java API and not via persistence.xml. I don't use the

Kind regards,

eclipselink-users mailing list

Back to the top