protected boolean hasJNDIBinding(String jndiName) { assert jndiName != null : "jndiName is null"; if(localBinding != null) { if(localBinding.jndiBinding().equals(jndiName)) return true; } if(remoteBindings != null) { for(RemoteBinding binding : remoteBindings.value()) { if(binding.jndiBinding().equals(jndiName)) return true; } } return false; }
/** * * @author sletellier */ @Local @LocalBinding(jndiBinding="ServiceSuiviImpl/local") public interface ServiceSuiviLocal extends ServiceSuivi { }
public String getResourceAdaptorName() { ResourceAdapter annotation = (ResourceAdapter) resolveAnnotation(ResourceAdapter.class); if (annotation == null) return JMS_ADAPTOR; return annotation.value(); }
protected static int getTransactionTimeout(Advisor advisor, Method method) { TransactionTimeout annotation = (TransactionTimeout)advisor.resolveAnnotation(method, TransactionTimeout.class); if (annotation == null) annotation = (TransactionTimeout)advisor.resolveAnnotation(TransactionTimeout.class); if (annotation != null) { return annotation.value(); } return -1; }
protected void populateActivationSpec() { DefaultActivationSpecs defaultSpecs = (DefaultActivationSpecs) resolveAnnotation(DefaultActivationSpecs.class); if (defaultSpecs != null) { activationSpec.merge(defaultSpecs.value()); } Consumer md = (Consumer) resolveAnnotation(Consumer.class); activationSpec.merge(md.activationConfig()); }
@TransactionTimeout(value = 5, unit = TimeUnit.MINUTES) public void saveConcerts(Iterable<Concert> concerts) { int i = 0; for ( Concert concert : concerts ) { entityManager.persist( concert ); if ( i % 50 == 0 ) { entityManager.flush(); entityManager.clear(); } i++; } }
/** * @author sletellier */ @Remote @RemoteBinding(jndiBinding="ServiceSynchNumberImpl/remote") public interface ServiceSynchNumber { public Long getNextSynchroNumber() throws TopiaException; Long getCurrentSynchroNumber() throws TopiaException; }
/** * @author <a href="mailto:cdewolf@redhat.com">Carlo de Wolf</a> */ @MessageDriven(messageListenerInterface = PostmanPat.class) @ResourceAdapter("ejb3-rar.rar") public class PostmanPatMDB implements PostmanPat { @Override public void deliver(String message) { System.out.println("Got message " + message); } }
/** * @author sletellier */ @Local @LocalBinding(jndiBinding="ServiceSynchNumberImpl/local") public interface ServiceSynchNumberLocal extends ServiceSynchNumber { }
protected int resolveTransactionTimeout(Advisor advisor, Method method) { TransactionTimeout annotation = (TransactionTimeout)advisor.resolveAnnotation(method, TransactionTimeout.class); if (annotation == null) annotation = (TransactionTimeout)advisor.resolveAnnotation(TransactionTimeout.class); if (annotation != null) { return annotation.value(); } return -1; }
@TransactionTimeout(value = 5, unit = TimeUnit.MINUTES) public void persist(Iterable<Message> messages) { int i = 0; for ( Message m : messages ) { em.persist( m ); if ( i % 50 == 0 ) { em.flush(); em.clear(); } i++; } }
/** * @author sletellier */ @Remote @RemoteBinding(jndiBinding="ServiceSynchNumberImpl/remote") public interface ServiceSynchNumber { public Long getNextSynchroNumber() throws TopiaException; Long getCurrentSynchroNumber() throws TopiaException; }
/** * @author sletellier */ @Local @LocalBinding(jndiBinding="ServiceSynchNumberImpl/local") public interface ServiceSynchNumberLocal extends ServiceSynchNumber { }
/** * * @author sletellier */ @Local @LocalBinding(jndiBinding="ServiceScheduleImpl/local") public interface ServiceScheduleLocal extends ServiceSchedule { }
/** * * @author sletellier */ @Local @LocalBinding(jndiBinding="ServiceSuiviImpl/local") public interface ServiceSuiviLocal extends ServiceSuivi { }
/** * * @author sletellier */ @Local @LocalBinding(jndiBinding="ServiceScheduleImpl/local") public interface ServiceScheduleLocal extends ServiceSchedule { }
@Local @LocalBinding(jndiBinding="ServiceNotifierImpl/local") public interface ServiceNotifierLocal extends ServiceNotifier { }
@Local @LocalBinding(jndiBinding="ServiceNotifierImpl/local") public interface ServiceNotifierLocal extends ServiceNotifier { }
@Local @LocalBinding(jndiBinding="ServiceTourImpl/local") public interface ServiceTourLocal extends ServiceTour { }
@Local @LocalBinding(jndiBinding="ServiceWebImpl/local") public interface ServiceWebLocal extends ServiceWeb { }