List of usage examples for javax.ejb EJBException getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:ru.codeinside.gses.manager.ManagerService.java
public Procedure createProcedure(String name, String description, String serviceId, Long code, String login, ProcedureType type) {//from www . jav a 2 s .c om try { if (hasProcedureWithSameRegisterCode(code)) { throw new RuntimeException( " ? ??"); } final Procedure procedure = new Procedure(); mergeProcedure(procedure, name, description, serviceId, code, type); procedure.setCreator(em.find(Employee.class, login)); em.persist(procedure); return procedure; } catch (EJBException e) { final String message; if (e.getMessage() != null) { message = e.getMessage(); } else if (e.getCausedByException() != null) { message = e.getCausedByException().getMessage(); } else { message = e.getCause() != null ? e.getCause().getMessage() : e.getClass().toString(); } throw new RuntimeException(message); } }