code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
private void closePendingSessions() {
synchronized (sessions) {
for (DualSessionWrapper dualSessionWrapper : sessions) {
if (dualSessionWrapper.getState() != State.ACCESSIBLE)
continue;
try {
if (log.isDebugEnabled()) { log.deb... | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | closePendingSessions | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
protected Session createSession(boolean transacted, int acknowledgeMode) throws JMSException {
synchronized (sessions) {
DualSessionWrapper sessionHandle = getNotAccessibleSession();
if (sessionHandle == null) {
if (log.isDebugEnabled()) { log.debug("no session handle fo... | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | createSession | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
private DualSessionWrapper getNotAccessibleSession() {
synchronized (sessions) {
if (log.isDebugEnabled()) { log.debug(sessions.size() + " session(s) open from " + this); }
for (DualSessionWrapper sessionHandle : sessions) {
if (sessionHandle.getState() == State.NOT_ACCES... | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | getNotAccessibleSession | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public Date getLastReleaseDate() {
return lastReleaseDate;
} | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | getLastReleaseDate | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public String toString() {
return "a JmsPooledConnection of pool " + poolingConnectionFactory.getUniqueName() + " in state " +
getState() + " with underlying connection " + xaConnection;
} | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public String getStateDescription() {
return getState().toString();
} | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | getStateDescription | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public Date getAcquisitionDate() {
return acquisitionDate;
} | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | getAcquisitionDate | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public Collection<String> getTransactionGtridsCurrentlyHoldingThis() {
synchronized (sessions) {
Set<String> result = new HashSet<String>();
for (DualSessionWrapper dsw : sessions) {
result.addAll(dsw.getXAResourceHolderStateGtrids());
}
... | Implementation of a JMS pooled connection wrapping vendor's {@link XAConnection} implementation.
@author Ludovic Orban
TODO: how can the JMS connection be accurately tested? | getTransactionGtridsCurrentlyHoldingThis | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public void stateChanged(JmsPooledConnection source, State oldState, State newState) {
if (newState == State.IN_POOL) {
if (log.isDebugEnabled()) { log.debug("requeued JMS connection of " + poolingConnectionFactory); }
lastReleaseDate = new Date(MonotonicClo... | {@link JmsPooledConnection} {@link bitronix.tm.resource.common.StateChangeListener}.
When state changes to State.CLOSED, the connection is unregistered from
{@link bitronix.tm.utils.ManagementRegistrar}. | stateChanged | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public void stateChanging(JmsPooledConnection source, State currentState, State futureState) {
} | {@link JmsPooledConnection} {@link bitronix.tm.resource.common.StateChangeListener}.
When state changes to State.CLOSED, the connection is unregistered from
{@link bitronix.tm.utils.ManagementRegistrar}. | stateChanging | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public void stateChanged(DualSessionWrapper source, State oldState, State newState) {
if (newState == State.CLOSED) {
synchronized (sessions) {
sessions.remove(source);
if (log.isDebugEnabled()) { log.debug("DualSessionWrapper has bee... | {@link JmsConnectionHandle} {@link bitronix.tm.resource.common.StateChangeListener}.
When state changes to State.CLOSED, the session is removed from the list of opened sessions. | stateChanged | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
@Override
public void stateChanging(DualSessionWrapper source, State currentState, State futureState) {
} | {@link JmsConnectionHandle} {@link bitronix.tm.resource.common.StateChangeListener}.
When state changes to State.CLOSED, the session is removed from the list of opened sessions. | stateChanging | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
public DualSessionWrapper getXAResourceHolderForXaResource(XAResource xaResource) {
synchronized (sessions) {
for (DualSessionWrapper xaResourceHolder : sessions) {
if (xaResourceHolder.getXAResource() == xaResource) {
return xaResourceHolder;
}
... | {@link JmsConnectionHandle} {@link bitronix.tm.resource.common.StateChangeListener}.
When state changes to State.CLOSED, the session is removed from the list of opened sessions. | getXAResourceHolderForXaResource | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JmsPooledConnection.java | Apache-2.0 |
public String getInitialContextFactory() {
return initialContextFactory;
} | The {@link Context#INITIAL_CONTEXT_FACTORY} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@return the {@link Context#INITIAL_CONTEXT_FACTORY} value. | getInitialContextFactory | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setInitialContextFactory(String initialContextFactory) {
this.initialContextFactory = initialContextFactory;
} | Set the {@link Context#INITIAL_CONTEXT_FACTORY} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
If not set, the {@link Context} is created without the environment parameter, using the default constructor. This means
<i>all other properties (providerUrl, urlPkgPrefixes, extraJndiProperties...)... | setInitialContextFactory | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public String getProviderUrl() {
return providerUrl;
} | The {@link Context#PROVIDER_URL} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@return the {@link Context#PROVIDER_URL} value. | getProviderUrl | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setProviderUrl(String providerUrl) {
this.providerUrl = providerUrl;
} | Set the {@link Context#PROVIDER_URL} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@param providerUrl the {@link Context#PROVIDER_URL} value. | setProviderUrl | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public String getUrlPkgPrefixes() {
return urlPkgPrefixes;
} | The {@link Context#URL_PKG_PREFIXES} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@return the {@link Context#URL_PKG_PREFIXES} value. | getUrlPkgPrefixes | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setUrlPkgPrefixes(String urlPkgPrefixes) {
this.urlPkgPrefixes = urlPkgPrefixes;
} | Set the {@link Context#URL_PKG_PREFIXES} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@param urlPkgPrefixes the {@link Context#URL_PKG_PREFIXES} value. | setUrlPkgPrefixes | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public String getSecurityPrincipal() {
return securityPrincipal;
} | The {@link Context#SECURITY_PRINCIPAL} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@return the {@link Context#SECURITY_PRINCIPAL} value. | getSecurityPrincipal | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setSecurityPrincipal(String securityPrincipal) {
this.securityPrincipal = securityPrincipal;
} | Set the {@link Context#SECURITY_PRINCIPAL} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
If {@link Context#INITIAL_CONTEXT_FACTORY} and {@link Context#PROVIDER_URL} are not set, this value is ignored.
@param securityPrincipal the {@link Context#SECURITY_PRINCIPAL} value. | setSecurityPrincipal | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public String getSecurityCredentials() {
return securityCredentials;
} | The {@link Context#SECURITY_CREDENTIALS} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
@return the {@link Context#SECURITY_CREDENTIALS} value. | getSecurityCredentials | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setSecurityCredentials(String securityCredentials) {
this.securityCredentials = securityCredentials;
} | Set the {@link Context#SECURITY_CREDENTIALS} of the JNDI {@link Context} used to fetch the {@link XAConnectionFactory}.
If {@link Context#INITIAL_CONTEXT_FACTORY} and {@link Context#PROVIDER_URL} are not set, this value is ignored.
@param securityCredentials the {@link Context#SECURITY_CREDENTIALS} value. | setSecurityCredentials | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public String getName() {
return name;
} | The JNDI name under which the {@link XAConnectionFactory} is available.
@return The JNDI name. | getName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setName(String name) {
this.name = name;
} | Set the JNDI name under which the {@link XAConnectionFactory} is available.
@param name the JNDI name. | setName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public Properties getExtraJndiProperties() {
return extraJndiProperties;
} | The extra JNDI environment properties added the the {@link InitialContext}'s environment upon creation.
@return The extra JNDI environment properties. | getExtraJndiProperties | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setExtraJndiProperties(Properties extraJndiProperties) {
this.extraJndiProperties = extraJndiProperties;
} | Set the extra JNDI environment properties added the the {@link InitialContext}'s environment upon creation.
@param extraJndiProperties The extra JNDI environment properties. | setExtraJndiProperties | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public boolean isNarrowJndiObject() {
return narrowJndiObject;
} | Should {@link PortableRemoteObject#narrow(Object, Class)} be applied on the object looked up from
JNDI before trying to cast it to {@link XAConnectionFactory} ?
@return true if the object should be narrowed, false otherwise. | isNarrowJndiObject | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public void setNarrowJndiObject(boolean narrowJndiObject) {
this.narrowJndiObject = narrowJndiObject;
} | Set if {@link PortableRemoteObject#narrow(Object, Class)} should be applied on the object looked up from
JNDI before trying to cast it to {@link XAConnectionFactory} ?
@param narrowJndiObject true if the object should be narrowed, false otherwise. | setNarrowJndiObject | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
protected void init() throws NamingException {
if (wrappedFactory != null)
return;
Context ctx;
if (!isEmpty(initialContextFactory)) {
Hashtable<Object, Object> env = new Hashtable<Object, Object>();
env.put(Context.INITIAL_CONTEXT_FACTORY, initialContextFact... | Set if {@link PortableRemoteObject#narrow(Object, Class)} should be applied on the object looked up from
JNDI before trying to cast it to {@link XAConnectionFactory} ?
@param narrowJndiObject true if the object should be narrowed, false otherwise. | init | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
@Override
public XAConnection createXAConnection() throws JMSException {
try {
init();
return wrappedFactory.createXAConnection();
} catch (NamingException ex) {
throw (JMSException) new JMSException("error looking up wrapped XAConnectionFactory at " + name).initC... | Set if {@link PortableRemoteObject#narrow(Object, Class)} should be applied on the object looked up from
JNDI before trying to cast it to {@link XAConnectionFactory} ?
@param narrowJndiObject true if the object should be narrowed, false otherwise. | createXAConnection | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
@Override
public XAConnection createXAConnection(String userName, String password) throws JMSException {
try {
init();
return wrappedFactory.createXAConnection(userName, password);
} catch (NamingException ex) {
throw (JMSException) new JMSException("error looking... | Set if {@link PortableRemoteObject#narrow(Object, Class)} should be applied on the object looked up from
JNDI before trying to cast it to {@link XAConnectionFactory} ?
@param narrowJndiObject true if the object should be narrowed, false otherwise. | createXAConnection | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
private static boolean isEmpty(String str) {
return str == null || str.trim().equals("");
} | Set if {@link PortableRemoteObject#narrow(Object, Class)} should be applied on the object looked up from
JNDI before trying to cast it to {@link XAConnectionFactory} ?
@param narrowJndiObject true if the object should be narrowed, false otherwise. | isEmpty | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/JndiXAConnectionFactory.java | Apache-2.0 |
public MessageConsumer getMessageConsumer() {
return messageConsumer;
} | {@link MessageConsumer} wrapper that adds XA enlistment semantics.
@author Ludovic Orban | getMessageConsumer | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
protected void enlistResource() throws JMSException {
if (poolingConnectionFactory.getAutomaticEnlistingEnabled()) {
session.getSession(); // make sure the session is created before enlisting it
try {
TransactionContextHelper.enlistInCurrentTransaction(session);
... | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | enlistResource | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public String toString() {
return "a MessageConsumerWrapper of " + session;
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public Message receive() throws JMSException {
enlistResource();
return getMessageConsumer().receive();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | receive | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public Message receive(long timeout) throws JMSException {
enlistResource();
return getMessageConsumer().receive(timeout);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | receive | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public Message receiveNoWait() throws JMSException {
enlistResource();
return getMessageConsumer().receiveNoWait();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | receiveNoWait | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public void close() throws JMSException {
// do nothing as the close is handled by the session handle
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | close | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public String getMessageSelector() throws JMSException {
return getMessageConsumer().getMessageSelector();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | getMessageSelector | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public MessageListener getMessageListener() throws JMSException {
return getMessageConsumer().getMessageListener();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | getMessageListener | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public void setMessageListener(MessageListener listener) throws JMSException {
getMessageConsumer().setMessageListener(listener);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws javax.jms.JMSException if an exception occurs | setMessageListener | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageConsumerWrapper.java | Apache-2.0 |
@Override
public boolean equals(Object obj) {
if (obj instanceof MessageProducerConsumerKey) {
MessageProducerConsumerKey otherKey = (MessageProducerConsumerKey) obj;
if (!areEquals(getDestinationName(), otherKey.getDestinationName()))
return false;
if (!... | JMS destination wrapper optimized for use with hashed collections where it is the key and a
{@link javax.jms.MessageProducer} or a {@link javax.jms.MessageConsumer} is the value.
@author Ludovic Orban | equals | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | Apache-2.0 |
private static boolean areEquals(Object o1, Object o2) {
if (o1 == null && o2 == null)
return true;
if (o1 != null && o2 == null)
return false;
if (o1 == null)
return false;
return o1.equals(o2);
} | JMS destination wrapper optimized for use with hashed collections where it is the key and a
{@link javax.jms.MessageProducer} or a {@link javax.jms.MessageConsumer} is the value.
@author Ludovic Orban | areEquals | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | Apache-2.0 |
private String getDestinationName() {
if (destination == null) {
return null;
}
else if (destination instanceof Queue) {
try {
return ((Queue) destination).getQueueName();
} catch (JMSException ex) {
throw new BitronixRuntimeExc... | JMS destination wrapper optimized for use with hashed collections where it is the key and a
{@link javax.jms.MessageProducer} or a {@link javax.jms.MessageConsumer} is the value.
@author Ludovic Orban | getDestinationName | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | Apache-2.0 |
@Override
public int hashCode() {
return hash(getDestinationName()) + hash(messageSelector) + hash(noLocal);
} | JMS destination wrapper optimized for use with hashed collections where it is the key and a
{@link javax.jms.MessageProducer} or a {@link javax.jms.MessageConsumer} is the value.
@author Ludovic Orban | hashCode | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | Apache-2.0 |
private static int hash(Object o) {
if (o == null)
return 0;
return o.hashCode();
} | JMS destination wrapper optimized for use with hashed collections where it is the key and a
{@link javax.jms.MessageProducer} or a {@link javax.jms.MessageConsumer} is the value.
@author Ludovic Orban | hash | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | Apache-2.0 |
@Override
public String toString() {
return "a MessageProducerConsumerKey on " + destination +
(messageSelector == null ? "" : (" with selector '" + messageSelector) + "'") +
(noLocal == null ? "" : (" and noLocal=" + noLocal));
} | JMS destination wrapper optimized for use with hashed collections where it is the key and a
{@link javax.jms.MessageProducer} or a {@link javax.jms.MessageConsumer} is the value.
@author Ludovic Orban | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerConsumerKey.java | Apache-2.0 |
public MessageProducer getMessageProducer() {
return messageProducer;
} | {@link MessageProducer} wrapper that adds XA enlistment semantics.
@author Ludovic Orban | getMessageProducer | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
protected void enlistResource() throws JMSException {
if (poolingConnectionFactory.getAutomaticEnlistingEnabled()) {
session.getSession(); // make sure the session is created before enlisting it
try {
TransactionContextHelper.enlistInCurrentTransaction(session);
... | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | enlistResource | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public String toString() {
return "a MessageProducerWrapper of " + session;
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void send(Message message) throws JMSException {
enlistResource();
getMessageProducer().send(message);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | send | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void send(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
enlistResource();
getMessageProducer().send(message, deliveryMode, priority, timeToLive);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | send | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void send(Destination destination, Message message) throws JMSException {
enlistResource();
getMessageProducer().send(destination, message);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | send | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void send(Destination destination, Message message, int deliveryMode, int priority, long timeToLive) throws JMSException {
enlistResource();
getMessageProducer().send(destination, message, deliveryMode, priority, timeToLive);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | send | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void close() throws JMSException {
// do nothing as the close is handled by the session handle
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | close | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void setDisableMessageID(boolean value) throws JMSException {
getMessageProducer().setDisableMessageID(value);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | setDisableMessageID | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public boolean getDisableMessageID() throws JMSException {
return getMessageProducer().getDisableMessageID();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | getDisableMessageID | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void setDisableMessageTimestamp(boolean value) throws JMSException {
getMessageProducer().setDisableMessageTimestamp(value);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | setDisableMessageTimestamp | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public boolean getDisableMessageTimestamp() throws JMSException {
return getMessageProducer().getDisableMessageTimestamp();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | getDisableMessageTimestamp | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void setDeliveryMode(int deliveryMode) throws JMSException {
getMessageProducer().setDeliveryMode(deliveryMode);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | setDeliveryMode | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public int getDeliveryMode() throws JMSException {
return getMessageProducer().getDeliveryMode();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | getDeliveryMode | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void setPriority(int defaultPriority) throws JMSException {
getMessageProducer().setPriority(defaultPriority);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | setPriority | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public int getPriority() throws JMSException {
return getMessageProducer().getPriority();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | getPriority | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public void setTimeToLive(long timeToLive) throws JMSException {
getMessageProducer().setTimeToLive(timeToLive);
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | setTimeToLive | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public long getTimeToLive() throws JMSException {
return getMessageProducer().getTimeToLive();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | getTimeToLive | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public Destination getDestination() throws JMSException {
return getMessageProducer().getDestination();
} | Enlist this session into the current transaction if automaticEnlistingEnabled = true for this resource.
If no transaction is running then this method does nothing.
@throws JMSException if an exception occurs | getDestination | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/MessageProducerWrapper.java | Apache-2.0 |
@Override
public synchronized void init() {
try {
if (pool != null)
return;
buildXAPool();
this.jmxName = "bitronix.tm:type=JMS,UniqueName=" + ManagementRegistrar.makeValidName(getUniqueName());
ManagementRegistrar.register(jmxName, this);
... | Initialize the pool by creating the initial amount of connections. | init | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public boolean getCacheProducersConsumers() {
return cacheProducersConsumers;
} | Initialize the pool by creating the initial amount of connections. | getCacheProducersConsumers | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public void setCacheProducersConsumers(boolean cacheProducersConsumers) {
this.cacheProducersConsumers = cacheProducersConsumers;
} | Initialize the pool by creating the initial amount of connections. | setCacheProducersConsumers | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public boolean getTestConnections() {
return testConnections;
} | Initialize the pool by creating the initial amount of connections. | getTestConnections | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public void setTestConnections(boolean testConnections) {
this.testConnections = testConnections;
} | Initialize the pool by creating the initial amount of connections. | setTestConnections | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public String getUser() {
return user;
} | Initialize the pool by creating the initial amount of connections. | getUser | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public void setUser(String user) {
this.user = user;
} | Initialize the pool by creating the initial amount of connections. | setUser | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public String getPassword() {
return password;
} | Initialize the pool by creating the initial amount of connections. | getPassword | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public void setPassword(String password) {
this.password = password;
} | Initialize the pool by creating the initial amount of connections. | setPassword | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
public void setXaConnectionFactory(XAConnectionFactory xaConnectionFactory) {
this.xaConnectionFactory = xaConnectionFactory;
} | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | setXaConnectionFactory | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
private void buildXAPool() throws Exception {
if (pool != null)
return;
if (log.isDebugEnabled()) { log.debug("building JMS XA pool for " + getUniqueName() + " with " + getMinPoolSize() + " connection(s)"); }
pool = new XAPool<DualSessionWrapper, JmsPooledConnection>(this, this, xaC... | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | buildXAPool | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public Connection createConnection() throws JMSException {
if (isDisabled()) {
throw new JMSException("JMS connection pool '" + getUniqueName() + "' is disabled, cannot get a connection from it");
}
try {
init();
return (Connection) pool.getConn... | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | createConnection | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public Connection createConnection(String userName, String password) throws JMSException {
if (log.isDebugEnabled()) { log.debug("JMS connections are pooled, username and password ignored"); }
return createConnection();
} | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | createConnection | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public String toString() {
return "a PoolingConnectionFactory with " + pool;
} | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryPooledConnection != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JmsConnectionHandle) pool.getConn... | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | startRecovery | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public void endRecovery() throws RecoveryException {
if (recoveryPooledConnection == null)
return;
try {
if (recoveryConnectionHandle != null) {
try {
if (log.isDebugEnabled()) { log.debug("recovery connection handle is being clo... | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | endRecovery | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public void setFailed(boolean failed) {
pool.setFailed(failed);
} | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | setFailed | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public boolean isFailed() {
return pool.isFailed();
} | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | isFailed | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public void close() {
if (pool == null)
return;
if (log.isDebugEnabled()) { log.debug("closing " + pool); }
pool.close();
pool = null;
ManagementRegistrar.unregister(jmxName);
jmxName = null;
ResourceRegistrar.unregister(this);
} | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | close | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public JmsPooledConnection createPooledConnection(Object xaFactory, ResourceBean bean) throws Exception {
if (!(xaFactory instanceof XAConnectionFactory))
throw new IllegalArgumentException("class '" + xaFactory.getClass().getName() + "' does not implement " + XAConnectionFactory.class... | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | createPooledConnection | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public DualSessionWrapper findXAResourceHolder(XAResource xaResource) {
synchronized (xaStatefulHolders) {
for (JmsPooledConnection jmsPooledConnection : xaStatefulHolders) {
DualSessionWrapper xaResourceHolder = jmsPooledConnection.getXAResourceHolderForXaResource(xaRe... | Inject a pre-configured XAConnectionFactory instead of relying on className and driverProperties
to build one. Upon deserialization the xaConnectionFactory will be null and will need to be
manually re-injected.
@param xaConnectionFactory the pre-configured XAConnectionFactory. | findXAResourceHolder | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public Reference getReference() throws NamingException {
if (log.isDebugEnabled()) { log.debug("creating new JNDI reference of " + this); }
return new Reference(
PoolingConnectionFactory.class.getName(),
new StringRefAddr("uniqueName", getUniqueName()),
... | {@link PoolingConnectionFactory} must alway have a unique name so this method builds a reference to this object
using the unique name as {@link javax.naming.RefAddr}.
@return a reference to this {@link PoolingConnectionFactory}. | getReference | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public long getInPoolSize() {
return pool.inPoolSize();
} | {@link PoolingConnectionFactory} must alway have a unique name so this method builds a reference to this object
using the unique name as {@link javax.naming.RefAddr}.
@return a reference to this {@link PoolingConnectionFactory}. | getInPoolSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public long getTotalPoolSize() {
return pool.totalPoolSize();
} | {@link PoolingConnectionFactory} must alway have a unique name so this method builds a reference to this object
using the unique name as {@link javax.naming.RefAddr}.
@return a reference to this {@link PoolingConnectionFactory}. | getTotalPoolSize | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public void reset() throws Exception {
pool.reset();
} | {@link PoolingConnectionFactory} must alway have a unique name so this method builds a reference to this object
using the unique name as {@link javax.naming.RefAddr}.
@return a reference to this {@link PoolingConnectionFactory}. | reset | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/PoolingConnectionFactory.java | Apache-2.0 |
@Override
public Topic getTopic() throws JMSException {
return ((TopicSubscriber) getMessageConsumer()).getTopic();
} | {@link TopicSubscriber} wrapper that adds XA enlistment semantics.
@author Ludovic Orban | getTopic | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/TopicSubscriberWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/TopicSubscriberWrapper.java | Apache-2.0 |
@Override
public boolean getNoLocal() throws JMSException {
return ((TopicSubscriber) getMessageConsumer()).getNoLocal();
} | {@link TopicSubscriber} wrapper that adds XA enlistment semantics.
@author Ludovic Orban | getNoLocal | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/TopicSubscriberWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/TopicSubscriberWrapper.java | Apache-2.0 |
@Override
public String toString() {
return "a TopicSubscriberWrapper of " + session;
} | {@link TopicSubscriber} wrapper that adds XA enlistment semantics.
@author Ludovic Orban | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/resource/jms/TopicSubscriberWrapper.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/resource/jms/TopicSubscriberWrapper.java | Apache-2.0 |
@Override
public Object getObject() {
return xaPool;
} | This task is used to notify a XA pool to close idle connections.
@author Ludovic Orban | getObject | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/timer/PoolShrinkingTask.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/timer/PoolShrinkingTask.java | Apache-2.0 |
@Override
public void execute() throws TaskException {
try {
xaPool.shrink();
} catch (Exception ex) {
throw new TaskException("error while trying to shrink " + xaPool, ex);
} finally {
getTaskScheduler().schedulePoolShrinking(xaPool);
}
} | This task is used to notify a XA pool to close idle connections.
@author Ludovic Orban | execute | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/timer/PoolShrinkingTask.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/timer/PoolShrinkingTask.java | Apache-2.0 |
@Override
public String toString() {
return "a PoolShrinkingTask scheduled for " + getExecutionTime() + " on " + xaPool;
} | This task is used to notify a XA pool to close idle connections.
@author Ludovic Orban | toString | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/timer/PoolShrinkingTask.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/timer/PoolShrinkingTask.java | Apache-2.0 |
@Override
public Object getObject() {
return recoverer;
} | This task is used to run the background recovery.
@author Ludovic Orban | getObject | java | scalar-labs/btm | btm/src/main/java/bitronix/tm/timer/RecoveryTask.java | https://github.com/scalar-labs/btm/blob/master/btm/src/main/java/bitronix/tm/timer/RecoveryTask.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.