com.github.marschall.jakartajmsadapter.JakartaServerSessionPool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jakarta-jms-adapter Show documentation
Show all versions of jakarta-jms-adapter Show documentation
Adapts a javax.jms JMS provider to a jakarta.jms JMS provider.
The newest version!
package com.github.marschall.jakartajmsadapter;
import java.util.Objects;
import jakarta.jms.JMSException;
import jakarta.jms.ServerSession;
import jakarta.jms.ServerSessionPool;
final class JakartaServerSessionPool implements ServerSessionPool, Wrapper {
private final javax.jms.ServerSessionPool serverSessionPool;
JakartaServerSessionPool(javax.jms.ServerSessionPool serverSessionPool) {
Objects.requireNonNull(serverSessionPool);
this.serverSessionPool = serverSessionPool;
}
@Override
public ServerSession getServerSession() throws JMSException {
try {
return new JakartaServerSession(this.serverSessionPool.getServerSession());
} catch (javax.jms.JMSException e) {
throw JMSExceptionUtil.adaptException(e);
}
}
@Override
public Object getJavaxObject() {
return this.serverSessionPool;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy