I made some progress in that the index files are copied from one node to another. However, the JMS is still an issue. I know you mentioned you're not an expert, Sanne, but maybe someone else can help :)
The error I'm getting is very generic and has to do with transactions:
Code:
19:37:33,961 ERROR [stderr] javax.jms.JMSException: Could not create a session: IJ000460: Error checking for a transaction
19:37:33,962 ERROR [stderr] at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:1002)
19:37:33,962 ERROR [stderr] at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:566)
19:37:33,962 ERROR [stderr] at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:822)
19:37:33,962 ERROR [stderr] at org.hornetq.ra.HornetQRASessionFactoryImpl.createSession(HornetQRASessionFactoryImpl.java:828)
19:37:33,963 ERROR [stderr] at com.tellyo.rtc.utils.LuceneIndexJMSBackendWorker$1.run(LuceneIndexJMSBackendWorker.java:122)
19:37:33,963 ERROR [stderr] at com.tellyo.rtc.utils.LuceneIndexJMSBackendWorker.applyWork(LuceneIndexJMSBackendWorker.java:139)
19:37:33,963 ERROR [stderr] at org.hibernate.search.indexes.spi.DirectoryBasedIndexManager.performOperations(DirectoryBasedIndexManager.java:112)
19:37:33,963 ERROR [stderr] at org.hibernate.search.backend.impl.WorkQueuePerIndexSplitter.commitOperations(WorkQueuePerIndexSplitter.java:49)
19:37:33,964 ERROR [stderr] at org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(BatchedQueueingProcessor.java:81)
19:37:33,964 ERROR [stderr] at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.afterCompletion(PostTransactionWorkQueueSynchronization.java:88)
19:37:33,964 ERROR [stderr] at org.hibernate.search.backend.impl.EventSourceTransactionContext$DelegateToSynchronizationOnAfterTx.doAfterTransactionCompletion(EventSourceTransactionContext.java:192)
19:37:33,964 ERROR [stderr] at org.hibernate.engine.spi.ActionQueue$AfterTransactionCompletionProcessQueue.afterTransactionCompletion(ActionQueue.java:744)
19:37:33,965 ERROR [stderr] at org.hibernate.engine.spi.ActionQueue.afterTransactionCompletion(ActionQueue.java:379)
19:37:33,965 ERROR [stderr] at org.hibernate.internal.SessionImpl.afterTransactionCompletion(SessionImpl.java:529)
19:37:33,965 ERROR [stderr] at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.afterTransaction(TransactionCoordinatorImpl.java:150)
19:37:33,965 ERROR [stderr] at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorNonTrackingImpl.doAfterCompletion(SynchronizationCallbackCoordinatorNonTrackingImpl.java:140)
19:37:33,966 ERROR [stderr] at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorTrackingImpl.afterCompletion(SynchronizationCallbackCoordinatorTrackingImpl.java:87)
19:37:33,966 ERROR [stderr] at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.afterCompletion(RegisteredSynchronization.java:56)
19:37:33,966 ERROR [stderr] at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:96)
19:37:33,966 ERROR [stderr] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:532)
19:37:33,967 ERROR [stderr] at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:101)
19:37:33,967 ERROR [stderr] at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162)
19:37:33,967 ERROR [stderr] at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1166)
19:37:33,967 ERROR [stderr] at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126)
19:37:33,968 ERROR [stderr] at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75)
19:37:33,968 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.endTransaction(CMTTxInterceptor.java:93)
19:37:33,968 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:277)
19:37:33,969 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.requiresNew(CMTTxInterceptor.java:364)
19:37:33,969 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:241)
19:37:33,969 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,969 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
19:37:33,970 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,970 ERROR [stderr] at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
19:37:33,970 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,971 ERROR [stderr] at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
19:37:33,971 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,971 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
19:37:33,971 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,972 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
19:37:33,972 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,972 ERROR [stderr] at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
19:37:33,972 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,973 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
19:37:33,973 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,973 ERROR [stderr] at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
19:37:33,973 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,974 ERROR [stderr] at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
19:37:33,974 ERROR [stderr] at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:439)
19:37:33,974 ERROR [stderr] at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
19:37:33,974 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,975 ERROR [stderr] at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
19:37:33,975 ERROR [stderr] at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
19:37:33,975 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,975 ERROR [stderr] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
19:37:33,976 ERROR [stderr] at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
19:37:33,976 ERROR [stderr] at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
19:37:33,976 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,976 ERROR [stderr] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
19:37:33,977 ERROR [stderr] at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
19:37:33,977 ERROR [stderr] at com.tellyo.rtc.dao.MomentDAO$$$view204.shareMoment(Unknown Source)
19:37:33,977 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:37:33,977 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
19:37:33,978 ERROR [stderr] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
19:37:33,978 ERROR [stderr] at java.lang.reflect.Method.invoke(Method.java:606)
19:37:33,978 ERROR [stderr] at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:414)
19:37:33,978 ERROR [stderr] at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
19:37:33,979 ERROR [stderr] at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
19:37:33,979 ERROR [stderr] at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65)
19:37:33,979 ERROR [stderr] at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
19:37:33,979 ERROR [stderr] at com.tellyo.rtc.dao.MomentDAO$Proxy$_$$_Weld$EnterpriseProxy$.shareMoment(Unknown Source)
19:37:33,980 ERROR [stderr] at com.tellyo.rtc.logic.MomentLogic.shareProRecording(MomentLogic.java:2229)
19:37:33,980 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:37:33,980 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
19:37:33,980 ERROR [stderr] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
19:37:33,981 ERROR [stderr] at java.lang.reflect.Method.invoke(Method.java:606)
19:37:33,981 ERROR [stderr] at org.jboss.as.ee.component.ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptor.java:52)
19:37:33,981 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,981 ERROR [stderr] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
19:37:33,982 ERROR [stderr] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
19:37:33,982 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,982 ERROR [stderr] at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
19:37:33,982 ERROR [stderr] at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.doMethodInterception(Jsr299BindingsInterceptor.java:82)
19:37:33,983 ERROR [stderr] at org.jboss.as.weld.ejb.Jsr299BindingsInterceptor.processInvocation(Jsr299BindingsInterceptor.java:93)
19:37:33,983 ERROR [stderr] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
19:37:33,983 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,983 ERROR [stderr] at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
19:37:33,984 ERROR [stderr] at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:63)
19:37:33,984 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,984 ERROR [stderr] at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
19:37:33,984 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,985 ERROR [stderr] at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
19:37:33,985 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,985 ERROR [stderr] at org.jboss.invocation.InterceptorContext$Invocation.proceed(InterceptorContext.java:407)
19:37:33,985 ERROR [stderr] at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:55)
19:37:33,986 ERROR [stderr] at org.jboss.as.weld.ejb.EjbRequestScopeActivationInterceptor.processInvocation(EjbRequestScopeActivationInterceptor.java:83)
19:37:33,986 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,986 ERROR [stderr] at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45)
19:37:33,986 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,987 ERROR [stderr] at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
19:37:33,987 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,987 ERROR [stderr] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
19:37:33,987 ERROR [stderr] at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
19:37:33,988 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,988 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.NonPooledEJBComponentInstanceAssociatingInterceptor.processInvocation(NonPooledEJBComponentInstanceAssociatingInterceptor.java:59)
19:37:33,988 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,988 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:273)
19:37:33,988 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.required(CMTTxInterceptor.java:340)
19:37:33,989 ERROR [stderr] at org.jboss.as.ejb3.tx.CMTTxInterceptor.processInvocation(CMTTxInterceptor.java:239)
19:37:33,989 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,989 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
19:37:33,989 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,990 ERROR [stderr] at org.jboss.as.ejb3.component.invocationmetrics.WaitTimeInterceptor.processInvocation(WaitTimeInterceptor.java:43)
19:37:33,990 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,990 ERROR [stderr] at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:95)
19:37:33,990 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,991 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
19:37:33,991 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,991 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
19:37:33,991 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,992 ERROR [stderr] at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
19:37:33,992 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,992 ERROR [stderr] at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
19:37:33,992 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,993 ERROR [stderr] at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:64)
19:37:33,993 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,993 ERROR [stderr] at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
19:37:33,993 ERROR [stderr] at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:448)
19:37:33,994 ERROR [stderr] at org.jboss.invocation.AccessCheckingInterceptor.processInvocation(AccessCheckingInterceptor.java:61)
19:37:33,994 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,994 ERROR [stderr] at org.jboss.invocation.InterceptorContext.run(InterceptorContext.java:326)
19:37:33,994 ERROR [stderr] at org.jboss.invocation.PrivilegedWithCombinerInterceptor.processInvocation(PrivilegedWithCombinerInterceptor.java:80)
19:37:33,995 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,995 ERROR [stderr] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
19:37:33,995 ERROR [stderr] at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:185)
19:37:33,995 ERROR [stderr] at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
19:37:33,996 ERROR [stderr] at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:309)
19:37:33,996 ERROR [stderr] at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
19:37:33,996 ERROR [stderr] at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:73)
19:37:33,996 ERROR [stderr] at com.tellyo.rtc.logic.MomentLogic$$$view209.shareProRecording(Unknown Source)
19:37:33,997 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
19:37:33,997 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
19:37:33,997 ERROR [stderr] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
19:37:33,997 ERROR [stderr] at java.lang.reflect.Method.invoke(Method.java:606)
19:37:33,998 ERROR [stderr] at org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap(Reflections.java:414)
19:37:33,998 ERROR [stderr] at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:127)
19:37:33,998 ERROR [stderr] at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
19:37:33,998 ERROR [stderr] at org.jboss.weld.bean.proxy.InjectionPointPropagatingEnterpriseTargetBeanInstance.invoke(InjectionPointPropagatingEnterpriseTargetBeanInstance.java:65)
19:37:33,999 ERROR [stderr] at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
19:37:33,999 ERROR [stderr] at com.tellyo.rtc.logic.MomentLogic$Proxy$_$$_Weld$EnterpriseProxy$.shareProRecording(Unknown Source)
19:37:33,999 ERROR [stderr] at com.tellyo.rtc.web.rest.ProRESTService$3.run(ProRESTService.java:735)
19:37:33,999 ERROR [stderr] at java.lang.Thread.run(Thread.java:745)
19:37:34,000 ERROR [stderr] Caused by: javax.resource.ResourceException: IJ000460: Error checking for a transaction
19:37:34,000 ERROR [stderr] at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:416)
19:37:34,001 ERROR [stderr] at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:513)
19:37:34,001 ERROR [stderr] at org.hornetq.ra.HornetQRASessionFactoryImpl.allocateConnection(HornetQRASessionFactoryImpl.java:948)
19:37:34,001 ERROR [stderr] ... 150 more
19:37:34,002 ERROR [stderr] Caused by: javax.resource.ResourceException: IJ000459: Transaction is not active: tx=TransactionImple < ac, BasicAction: 0:ffff5cde73e5:-459f89fc:555388df:9a3 status: ActionStatus.COMMITTED >
19:37:34,002 ERROR [stderr] at org.jboss.jca.core.connectionmanager.tx.TxConnectionManagerImpl.getManagedConnection(TxConnectionManagerImpl.java:400)
19:37:34,002 ERROR [stderr] ... 152 more
The code that is used to send the message is as follows (I used the JndiJMSBackendQueueProcessor as template):
Code:
@Stateless
public class LuceneIndexJMSBackendWorker implements BackendQueueProcessor {
private static Logger logger = Logger
.getLogger(LuceneIndexJMSBackendWorker.class);
public static final String JMS_QUEUE = Environment.WORKER_PREFIX
+ "jms.queue";
protected static final String JNDI_PREFIX = Environment.WORKER_PREFIX
+ "jndi.";
private IndexManager indexManager;
private SearchIntegrator integrator;
private String indexName;
private ConnectionFactory connectionFactory;
private Connection connection;
private String jmsQueueName;
@Override
public void initialize(Properties props, WorkerBuildContext context,
DirectoryBasedIndexManager indexManager) {
try {
InitialContext ctx = JNDIHelper.getInitialContext(props,
JNDI_PREFIX);
this.connectionFactory = (ConnectionFactory) ctx
.lookup("java:/LuceneRemote");
this.connection = this.connectionFactory.createConnection();
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
this.indexManager = indexManager;
this.indexName = indexManager.getIndexName();
this.integrator = context.getUninitializedSearchIntegrator();
this.jmsQueueName = props.getProperty(JMS_QUEUE);
}
public SearchIntegrator getSearchIntegrator() {
return integrator;
}
@Override
public void close() {
try {
if (connection != null) {
connection.close();
}
} catch (JMSException e) {
e.printStackTrace();
}
}
@Override
@TransactionAttribute(TransactionAttributeType.MANDATORY)
public void applyWork(List<LuceneWork> workList, IndexingMonitor monitor) {
if (workList == null) {
throw new IllegalArgumentException("workList should not be null");
}
final List<LuceneWork> runnableWorkList = workList;
Runnable operation = new Runnable() {
@Override
public void run() {
List<LuceneWork> filteredQueue = new ArrayList<LuceneWork>(
runnableWorkList);
for (LuceneWork work : runnableWorkList) {
if (work instanceof OptimizeLuceneWork) {
// we don't want optimization to be propagated
filteredQueue.remove(work);
}
}
if (filteredQueue.size() == 0) {
return;
}
LuceneWorkSerializer serializer = indexManager.getSerializer();
byte[] data = serializer.toSerializedModel(filteredQueue);
try {
logger.debug("Trying to send JMS Message");
Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
Queue jmsQueue = session.createQueue(jmsQueueName);
ObjectMessage message = session.createObjectMessage();
message.setObject(data);
message.setStringProperty(
Environment.INDEX_NAME_JMS_PROPERTY, indexName);
session.createProducer(jmsQueue).send(message);
logger.debug("JMS Messsage sent");
} catch (JMSException e) {
e.printStackTrace();
logger.error("unableToSendJMSWork for index " + indexName
+ " using queue " + jmsQueueName);
}
}
};
operation.run();
}
@Override
public void applyStreamWork(LuceneWork singleOperation,
IndexingMonitor monitor) {
applyWork(Collections.singletonList(singleOperation), monitor);
}
@Override
public Lock getExclusiveWriteLock() {
logger.warn("warnSuspiciousBackendDirectoryCombination " + indexName);
return new ReentrantLock(); // keep the invoker happy, still it's
// useless
}
@Override
public void indexMappingChanged() {
// no-op
}
I'm using the following pooled-connection-factory, defined in the standalone.xml file:
Code:
<pooled-connection-factory name="hornetq-remote-jms-lucene">
<transaction mode="xa"/>
<user>jmsuser</user>
<password>jmspassword</password>
<connectors>
<connector-ref connector-name="http-connector-remote-lucene"/>
</connectors>
<entries>
<entry name="java:/LuceneRemote"/>
</entries>
</pooled-connection-factory>
The connector is bound to an outbound-socket-binding and I'm sure that the connection is established correctly. I'm lacking knowledge about the transaction management in this case and I don't know how to make sure that a transaction is available to send the message.