javax.jms.XAJMSContext Java Examples

The following examples show how to use javax.jms.XAJMSContext. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TracingJMSContext.java    From brave with Apache License 2.0 5 votes vote down vote up
static JMSContext create(JMSContext delegate, JmsTracing jmsTracing) {
  if (delegate == null) throw new NullPointerException("delegate == null");
  if (jmsTracing == null) throw new NullPointerException("jmsTracing == null");
  if (delegate instanceof XAJMSContext) {
    return new TracingXAJMSContext((XAJMSContext) delegate, jmsTracing);
  }
  return new TracingJMSContext(delegate, jmsTracing);
}
 
Example #2
Source File: JmsPoolXAConnectionFactory.java    From pooled-jms with Apache License 2.0 5 votes vote down vote up
@Override
protected XAJMSContext createProviderContext(String username, String password, int sessionMode) {
    if (connectionFactory instanceof XAConnectionFactory) {
        if (username == null && password == null) {
            return ((XAConnectionFactory) connectionFactory).createXAContext();
        } else {
            return ((XAConnectionFactory) connectionFactory).createXAContext(username, password);
        }
    } else {
        throw new javax.jms.IllegalStateRuntimeException("connectionFactory should implement javax.jms.XAConnectionFactory");
    }
}
 
Example #3
Source File: ActiveMQConnectionForContextImpl.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
   refCounter.increment();

   return new ActiveMQXAJMSContext(this, threadAwareContext);
}
 
Example #4
Source File: TracingXAConnectionFactory.java    From brave with Apache License 2.0 4 votes vote down vote up
@JMS2_0 public XAJMSContext createXAContext(String userName, String password) {
  XAConnectionFactory xacf = (XAConnectionFactory) delegate;
  return TracingXAJMSContext.create(xacf.createXAContext(userName, password), jmsTracing);
}
 
Example #5
Source File: TracingXAConnectionFactory.java    From brave with Apache License 2.0 4 votes vote down vote up
@JMS2_0 public XAJMSContext createXAContext() {
  XAConnectionFactory xacf = (XAConnectionFactory) delegate;
  return TracingXAJMSContext.create(xacf.createXAContext(), jmsTracing);
}
 
Example #6
Source File: TracingXAJMSContext.java    From brave with Apache License 2.0 4 votes vote down vote up
@Override public XAResource getXAResource() {
  return ((XAJMSContext) delegate).getXAResource();
}
 
Example #7
Source File: TracingXAJMSContext.java    From brave with Apache License 2.0 4 votes vote down vote up
TracingXAJMSContext(XAJMSContext delegate, JmsTracing jmsTracing) {
  super(delegate, jmsTracing);
}
 
Example #8
Source File: TracingXAJMSContext.java    From brave with Apache License 2.0 4 votes vote down vote up
static XAJMSContext create(XAJMSContext delegate, JmsTracing jmsTracing) {
  if (delegate instanceof TracingXAJMSContext) return delegate;
  return new TracingXAJMSContext(delegate, jmsTracing);
}
 
Example #9
Source File: TomEEXAConnectionFactory.java    From tomee with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext(String userName, String password) {
    return new XAJMSContextImpl(this, Session.SESSION_TRANSACTED, userName, password);
}
 
Example #10
Source File: TomEEXAConnectionFactory.java    From tomee with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
    return new XAJMSContextImpl(this, Session.SESSION_TRANSACTED, userName, password);
}
 
Example #11
Source File: ActiveMQConnectionFactory.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
   return createXAContext(user, password);
}
 
Example #12
Source File: ActiveMQRASessionFactoryImpl.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
   incrementRefCounter();

   return new ActiveMQRAXAJMSContext(this, threadAwareContext);
}
 
Example #13
Source File: ActiveMQRAConnectionFactoryImpl.java    From activemq-artemis with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
   return createXAContext(null, null);
}
 
Example #14
Source File: TracingConnectionFactoryBeanPostProcessor.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext(String userName, String password) {
	return this.xaConnectionFactoryDelegate.createXAContext(userName, password);
}
 
Example #15
Source File: TracingConnectionFactoryBeanPostProcessor.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
	return this.xaConnectionFactoryDelegate.createXAContext();
}
 
Example #16
Source File: TracingConnectionFactoryBeanPostProcessor.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext(String s, String s1) {
	return wrappedDelegate().createXAContext(s, s1);
}
 
Example #17
Source File: TracingConnectionFactoryBeanPostProcessor.java    From spring-cloud-sleuth with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
	return wrappedDelegate().createXAContext();
}
 
Example #18
Source File: XAConnectionPoolTest.java    From pooled-jms with Apache License 2.0 4 votes vote down vote up
public XAJMSContext createXAContext(String userName, String password) {
    return null;
}
 
Example #19
Source File: XAConnectionPoolTest.java    From pooled-jms with Apache License 2.0 4 votes vote down vote up
public XAJMSContext createXAContext() {
    return null;
}
 
Example #20
Source File: JmsPoolXAConnectionFactory.java    From pooled-jms with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext(String userName, String password) {
    return createProviderContext(userName, password, 0);
}
 
Example #21
Source File: JmsPoolXAConnectionFactory.java    From pooled-jms with Apache License 2.0 4 votes vote down vote up
@Override
public XAJMSContext createXAContext() {
    return createProviderContext(null, null, 0);
}
 
Example #22
Source File: ActiveMQConnectionForContext.java    From activemq-artemis with Apache License 2.0 votes vote down vote up
XAJMSContext createXAContext();