protected void begin() throws ServiceRuntimeException { try { transactionManager.begin(); } catch (NotSupportedException e) { throw new ServiceRuntimeException(e); } catch (SystemException e) { throw new ServiceRuntimeException(e); } }
private Object handleFault(Message ret) throws InvocationTargetException { if (ret.getBody() instanceof ServiceRuntimeException) { ServiceRuntimeException e = (ServiceRuntimeException) ret.getBody(); if (e.getCause() instanceof NotAuthorizedException) { // authorization exceptions need to be mapped to a client 403 response throw new InvocationTargetException(new WebApplicationException(Response.Status.FORBIDDEN)); } throw new InvocationTargetException(e); } throw new InvocationTargetException((Throwable) ret.getBody()); }
private Object handleFault(Message ret) throws InvocationTargetException { if (ret.getBody() instanceof ServiceRuntimeException) { ServiceRuntimeException e = (ServiceRuntimeException) ret.getBody(); if (e.getCause() instanceof NotAuthorizedException) { // authorization exceptions need to be mapped to a client 403 response throw new InvocationTargetException(new WebApplicationException(Response.Status.FORBIDDEN)); } throw new InvocationTargetException(e); } throw new InvocationTargetException((Throwable) ret.getBody()); }
public Enumeration<URL> run() { try { return classLoader.getResources(compositeURI); } catch (IOException e) { throw new ServiceRuntimeException(e); } } });
private Object handleFault(Message ret) throws InvocationTargetException { if (ret.getBody() instanceof ServiceRuntimeException) { ServiceRuntimeException e = (ServiceRuntimeException) ret.getBody(); if (e.getCause() instanceof NotAuthorizedException) { // authorization exceptions need to be mapped to a client 403 response throw new InvocationTargetException(new WebApplicationException(Response.Status.FORBIDDEN)); } throw new InvocationTargetException(e); } throw new InvocationTargetException((Throwable) ret.getBody()); }
public Enumeration<URL> run() { try { return classLoader.getResources(compositeURI); } catch (IOException e) { throw new ServiceRuntimeException(e); } } });
protected Transaction getTransaction() throws ServiceRuntimeException { try { return transactionManager.getTransaction(); } catch (SystemException e) { throw new ServiceRuntimeException(e); } }
protected void resume(Transaction transaction) throws ServiceRuntimeException { try { transactionManager.resume(transaction); } catch (SystemException e) { throw new ServiceRuntimeException(e); } catch (InvalidTransactionException e) { throw new ServiceRuntimeException(e); } catch (IllegalStateException e) { throw new ServiceRuntimeException(e); } }
private Object createProxy() { try { return supplier.get(); } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } } }
public Class<?> run() { try { return Class.forName(fault.faultBean(), false, cls.getClassLoader()); } catch (ClassNotFoundException e) { throw new ServiceRuntimeException(e); } } });
public <T> T getService(Class<T> interfaze) { try { return serviceResolver.resolve(interfaze); } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } }
public <T> T getChannel(Class<T> interfaze, String name) { try { return channelResolver.getProducer(interfaze, name); } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } }
public Domain deploy(Composite composite) { try { provisioner.deploy(composite); return this; } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } }
public Domain deploy(Composite composite) { try { provisioner.deploy(composite); return this; } catch (DeploymentException e) { throw new ServiceRuntimeException(e); } }
public Domain undeploy(QName name) { try { provisioner.undeploy(name); return this; } catch (DeploymentException e) { throw new ServiceRuntimeException(e); } }
public Class<B> getBusinessInterface() { try { resolve(); return businessInterface; } catch (Exception e) { throw new ServiceRuntimeException(e); } }
public Domain deploy(Component<?> component) { try { provisioner.deploy(component); return this; } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } }
public Domain deploy(Channel channel) { try { provisioner.deploy(channel); return this; } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } } }
public Domain deploy(String name, Object instance, Class<?>... interfaces) { try { provisioner.deploy(name, instance, interfaces); return this; } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } }
public Domain deploy(Component<?> component) { try { provisioner.deploy(component); return this; } catch (Fabric3Exception e) { throw new ServiceRuntimeException(e); } }