org.jboss.ejb.plugins.cmp.jdbc
Class SQLExceptionProcessor
java.lang.Object
org.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.ejb.plugins.cmp.jdbc.SQLExceptionProcessor
- All Implemented Interfaces:
- MBeanRegistration, NotificationBroadcaster, NotificationEmitter, SQLExceptionProcessorMBean, org.jboss.kernel.spi.dependency.KernelControllerContextAware, Service, ServiceMBean
public final class SQLExceptionProcessor
- extends ServiceMBeanSupport
- implements SQLExceptionProcessorMBean
Default SQLExceptionProcessor.
- Author:
- Jeremy Boynes
Fields inherited from interface org.jboss.system.ServiceMBean |
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED |
Method Summary |
boolean |
isDuplicateKey(SQLException e)
Return true if the exception indicates that an operation failed due to a
unique constraint violation. |
Methods inherited from class org.jboss.system.ServiceMBeanSupport |
create, createService, destroy, destroyService, getDeploymentInfo, getLog, getName, getNextNotificationSequenceNumber, getObjectName, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, pojoChange, pojoCreate, pojoDestroy, pojoStart, pojoStop, postDeregister, postRegister, preDeregister, preRegister, setKernelControllerContext, start, startService, stop, stopService, unsetKernelControllerContext |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SQLExceptionProcessor
public SQLExceptionProcessor()
isDuplicateKey
public boolean isDuplicateKey(SQLException e)
- Return true if the exception indicates that an operation failed due to a
unique constraint violation. This could be from any unique constraint
not just the primary key.
- Specified by:
isDuplicateKey
in interface SQLExceptionProcessorMBean
- Parameters:
e
- the SQLException to process
- Returns:
- true if it was caused by a unique constraint violation
Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.