Trying to use Bitronix with Neo4J (and batis)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to use Bitronix with Neo4J (and batis)

tcolar


Hi, I'm trying to use Bitronix with batis/MySQl as well as Neo4J.

Batis works fine, but I'm struggling with Neo4j - Neo4J provides two XaResources, one for Neo4j itself and then one for lucene,
I can see them being registered in the producer fine.
---
lucene-index : com.teachscape.provisioning.transactional.Neo4jXAResourceProducer@6aa218a5
nioneodb : com.teachscape.provisioning.transactional.Neo4jXAResourceProducer@38002f54
---

However it always fails when trying to get the transaction.
---
Caused by: bitronix.tm.internal.BitronixSystemException: unknown XAResource org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaConnection$NeoStoreXaResource@d98c113, it does not belong to a registered resource
        at bitronix.tm.BitronixTransaction.enlistResource(BitronixTransaction.java:85)
        at org.neo4j.kernel.impl.persistence.PersistenceManager.getResource(PersistenceManager.java:237)
        ... 36 more
---

One thing that is strange in EhCacheProducer is the line "if (xaResource == xaResourceHolder.getXAResource())"
it works better if i use "xaResource.isSameRM(xaResourceHolder.getXAResource()))"

But fails later on:
---
Caused by: bitronix.tm.internal.BitronixSystemException: unknown XAResource org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaConnection$NeoStoreXaResource@611c4041, it does not belong to a registered resource
        at bitronix.tm.BitronixTransaction.enlistResource(BitronixTransaction.java:85)
        at org.neo4j.kernel.impl.persistence.PersistenceManager.getResource(PersistenceManager.java:237)
        ... 36 more
----

Not sure what the deal is ... any clue and or similar work i could look at to help ?

Note that the "same" code using jboss-transactions works (but I don't like it much for other reasons)

Thanks.

Code ->

-- Bottstrapping --
        // Use external Transaction provider for Neo4j (Bitronix)
        Configuration conf = TransactionManagerServices.getConfiguration();
        conf.setServerId("Provisioning");

        Neo4jBtmProviderImpl neo4jBtmProvider = new Neo4jBtmProviderImpl();
        bind(Neo4jBtmProviderImpl.class).toInstance(neo4jBtmProvider);

        Map<String,String> params = new HashMap<String, String>();
        params.put(Config.TXMANAGER_IMPLEMENTATION, Neo4jBtmProviderImpl.KEY);

--- jndi.properties --
java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory

-- I have made a transaction manager and registered it with Neo4j ---
/**
 * Provides Transaction management via Bitronix to Neo4j
 */
@Service.Implementation( TransactionManagerProvider.class )
public class Neo4jBtmProviderImpl extends TransactionManagerProvider
{
    public static String KEY = "btmTs";

    public Neo4jBtmProviderImpl()
    {
        super( KEY );
    }

    @Override
    public AbstractTransactionManager loadTransactionManager(String txLogDir, KernelPanicEventGenerator kpe, TxFinishHook txFinishHook) {
        return new Neo4jBtmServiceImpl();
    }
}

----- And the impl ----
/**
 * Provides Transaction management via Bitronix to Neo4j
 */
public class Neo4jBtmServiceImpl extends AbstractTransactionManager {
    private final TransactionManager tm;

    public Neo4jBtmServiceImpl(){
        Properties props = new Properties();
        //props.put("hibernate.transaction.factory_class", "org.hibernate.transaction.JTATransactionFactory");
        tm = TransactionManagerServices.getTransactionManager();
    }

    @Override
    public void init(XaDataSourceManager xaDsManager) {
        int bkpt=0;
        for(XaDataSource src: xaDsManager.getAllRegisteredDataSources()){
            Neo4jXAResourceProducer.registerXAResource(src.getName(), src.getXaConnection().getXaResource());
        }
        for(XaDataSource src: xaDsManager.getAllRegisteredDataSources()){
            //tm.getTransaction().enlistResource(src.getXaConnection().getXaResource());
            System.out.println(src.getName()+ " : "+ ResourceRegistrar.get(src.getName()));
        }
    }

    @Override
    public void stop() {
    }

    @Override
    public void begin() throws NotSupportedException, SystemException {
        tm.begin();
    }

    @Override
    public void commit() throws RollbackException, HeuristicMixedException, HeuristicRollbackException, SecurityException, IllegalStateException, SystemException {
        tm.commit();
    }

    @Override
    public int getStatus() throws SystemException {
        return tm.getStatus();
    }

    @Override
    public Transaction getTransaction() throws SystemException {
        Transaction t = tm.getTransaction();
        return t;
    }

    @Override
    public void resume(Transaction transaction) throws InvalidTransactionException, IllegalStateException, SystemException {
        tm.resume(transaction);
    }

    @Override
    public void rollback() throws IllegalStateException, SecurityException, SystemException {
        tm.rollback();
    }

    @Override
    public void setRollbackOnly() throws IllegalStateException, SystemException {
        tm.setRollbackOnly();
    }

    @Override
    public void setTransactionTimeout(int i) throws SystemException {
        tm.setTransactionTimeout(i);
    }

    @Override
    public Transaction suspend() throws SystemException {
        return tm.suspend();
    }
}

--- And here is the producer (base on EhCacheProducer ---
public class Neo4jXAResourceProducer extends ResourceBean implements XAResourceProducer {
    private static final Map<String, Neo4jXAResourceProducer> PRODUCERS = new HashMap<String, Neo4jXAResourceProducer>();

    private final List<Neo4JResourceHolder> xaResourceHolders = new ArrayList<Neo4JResourceHolder>();
    private RecoveryXAResourceHolder recoveryXAResourceHolder;
    private String uniqueName = Neo4jXAResourceProducer.class.getCanonicalName();

    @Override
    public String getUniqueName() {
        return uniqueName;
    }

    /**
      * Register an XAResource of a cache with BTM. The first time a XAResource is registered a new
      * EhCacheXAResourceProducer is created to hold it.
      * @param uniqueName the uniqueName of this XAResourceProducer, usually the cache's name
      * @param xaResource the XAResource to be registered
      */
     public static void registerXAResource(String uniqueName, XAResource xaResource) {
         synchronized (PRODUCERS) {
             Neo4jXAResourceProducer xaResourceProducer = PRODUCERS.get(uniqueName);

             if (xaResourceProducer == null) {
                 xaResourceProducer = new Neo4jXAResourceProducer();
                 xaResourceProducer.setUniqueName(uniqueName);
                 // the initial xaResource must be added before init() is called
                 xaResourceProducer.addXAResource(xaResource);
                 xaResourceProducer.init();

                 PRODUCERS.put(uniqueName, xaResourceProducer);
             } else {
                 xaResourceProducer.addXAResource(xaResource);
             }
         }
     }

    public void setUniqueName(String uniqueName) {
        this.uniqueName = uniqueName;
    }

    /**
      * Unregister an XAResource of a cache from BTM.
      * @param uniqueName the uniqueName of this XAResourceProducer, usually the cache's name
      * @param xaResource the XAResource to be registered
      */
     public static synchronized void unregisterXAResource(String uniqueName, XAResource xaResource) {
         synchronized (PRODUCERS) {
             Neo4jXAResourceProducer xaResourceProducer = PRODUCERS.get(uniqueName);

             if (xaResourceProducer != null) {
                 boolean found = xaResourceProducer.removeXAResource(xaResource);
             }
         }
     }


     private void addXAResource(XAResource xaResource) {
         synchronized (xaResourceHolders) {
             Neo4JResourceHolder xaResourceHolder = new Neo4JResourceHolder(xaResource, this);

             xaResourceHolders.add(xaResourceHolder);
         }
     }

     private boolean removeXAResource(XAResource xaResource) {
         synchronized (xaResourceHolders) {
             for (int i = 0; i < xaResourceHolders.size(); i++) {
                 Neo4JResourceHolder xaResourceHolder = xaResourceHolders.get(i);
                 if (xaResourceHolder.getXAResource() == xaResource) {
                     xaResourceHolders.remove(i);
                     return true;
                 }
             }
             return false;
         }
     }

     /**
      * {@inheritDoc}
      */
     public XAResourceHolderState startRecovery() throws RecoveryException {
         synchronized (xaResourceHolders) {
             if (recoveryXAResourceHolder != null) {
                 throw new RecoveryException("recovery already in progress on " + this);
             }

             if (xaResourceHolders.isEmpty()) {
                 throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
             }

             recoveryXAResourceHolder = new RecoveryXAResourceHolder((XAResourceHolder) xaResourceHolders.get(0));
             return new XAResourceHolderState(recoveryXAResourceHolder, this);
         }
     }

     /**
      * {@inheritDoc}
      */
     public void endRecovery() throws RecoveryException {
         recoveryXAResourceHolder = null;
     }

     /**
      * {@inheritDoc}
      */
     public void setFailed(boolean failed) {
         // cache cannot fail as it's not connection oriented
     }

     /**
      * {@inheritDoc}
      */
     public XAResourceHolder findXAResourceHolder(XAResource xaResource) {
         synchronized (xaResourceHolders) {
             for (int i = 0; i < xaResourceHolders.size(); i++) {
                 Neo4JResourceHolder xaResourceHolder = xaResourceHolders.get(i);
                     if (xaResource == xaResourceHolder.getXAResource()) {
                         return xaResourceHolder;
                     }
             }

             return null;
         }
     }

     /**
      * {@inheritDoc}
      */
     public void init() {
         try {
             ResourceRegistrar.register(this);
         } catch (RecoveryException e) {
             throw new BitronixRuntimeException("error recovering " + this, e);
         }
     }

     /**
      * {@inheritDoc}
      */
     public void close() {
         synchronized (xaResourceHolders) {
             xaResourceHolders.clear();
             ResourceRegistrar.unregister(this);
         }
     }

     /**
      * {@inheritDoc}
      */
     public XAStatefulHolder createPooledConnection(Object xaFactory, ResourceBean bean) throws Exception {
         throw new UnsupportedOperationException("EhCache is not connection-oriented");
     }

     /**
      * {@inheritDoc}
      */
     public Reference getReference() throws NamingException {
         return new Reference(Neo4jXAResourceProducer.class.getName(),
                 new StringRefAddr("uniqueName", getUniqueName()),
                 ResourceObjectFactory.class.getName(), null);
     }

}
-- and the resource handler --
package com.teachscape.provisioning.transactional;

import bitronix.tm.resource.common.AbstractXAResourceHolder;
import bitronix.tm.resource.common.ResourceBean;

import javax.transaction.xa.XAResource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Neo4JResourceHolder extends AbstractXAResourceHolder {

    private final XAResource resource;
    private final ResourceBean bean;

    public Neo4JResourceHolder(XAResource resource, ResourceBean bean) {
        this.resource = resource;
        this.bean = bean;
    }

    /**
     * {@inheritDoc}
     */
    public XAResource getXAResource() {
        return resource;
    }

    /**
     * {@inheritDoc}
     */
    public ResourceBean getResourceBean() {
        return bean;
    }

    /**
     * {@inheritDoc}
     */
    public void close() throws Exception {
        throw new UnsupportedOperationException("EhCacheXAResourceHolder cannot be used with an XAPool");
    }

    /**
     * {@inheritDoc}
     */
    public Object getConnectionHandle() throws Exception {
        throw new UnsupportedOperationException("EhCacheXAResourceHolder cannot be used with an XAPool");
    }

    /**
     * {@inheritDoc}
     */
    public Date getLastReleaseDate() {
        throw new UnsupportedOperationException("EhCacheXAResourceHolder cannot be used with an XAPool");
    }

    /**
     * {@inheritDoc}
     */
    public List getXAResourceHolders() {
        List xaResourceHolders = new ArrayList(1);
        xaResourceHolders.add(this);
        return xaResourceHolders;
    }

}


Reply | Threaded
Open this post in threaded view
|

Re: Trying to use Bitronix with Neo4J (and batis)

Ludovic Orban-2
As you noticed, BTM explicitly refuses to work with XAResources it doesn't know about.

In a nutshell, when an XAResource gets enlisted in a transaction, BTM will scan through all the resources registered in the ResourceRegistrar and ask them one by one if they know the enlisted XAResource until it finds the XAResourceProducer implementation which produced the XAResource or it doesn't find any producer and refuses the enlistment by throwing BitronixSystemException: unknown XAResource.


Briefly looking at your code, you seem to be on the right track as you need to create XAResourceProducer and XAResourceHolder implementation and register the producer in the ResourceRegistrar which you seem to be doing.

I'll look more closely at your code as soon as I find some spare time which unfortunately may not happen before this weekend


Keep you posted.
Ludovic

2011/10/1 tcolar <[hidden email]>



Hi, I'm trying to use Bitronix with batis/MySQl as well as Neo4J.

Batis works fine, but I'm struggling with Neo4j - Neo4J provides two
XaResources, one for Neo4j itself and then one for lucene,
I can see them being registered in the producer fine.
---
lucene-index :
com.teachscape.provisioning.transactional.Neo4jXAResourceProducer@6aa218a5
nioneodb :
com.teachscape.provisioning.transactional.Neo4jXAResourceProducer@38002f54
---

However it always fails when trying to get the transaction.
---
Caused by: bitronix.tm.internal.BitronixSystemException: unknown XAResource
org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaConnection$NeoStoreXaResource@d98c113,
it does not belong to a registered resource
       at
bitronix.tm.BitronixTransaction.enlistResource(BitronixTransaction.java:85)
       at
org.neo4j.kernel.impl.persistence.PersistenceManager.getResource(PersistenceManager.java:237)
       ... 36 more
---

One thing that is strange in EhCacheProducer is the line "if (xaResource ==
xaResourceHolder.getXAResource())"
it works better if i use
"xaResource.isSameRM(xaResourceHolder.getXAResource()))"

But fails later on:
---
Caused by: bitronix.tm.internal.BitronixSystemException: unknown XAResource
org.neo4j.kernel.impl.nioneo.xa.NeoStoreXaConnection$NeoStoreXaResource@611c4041,
it does not belong to a registered resource
       at
bitronix.tm.BitronixTransaction.enlistResource(BitronixTransaction.java:85)
       at
org.neo4j.kernel.impl.persistence.PersistenceManager.getResource(PersistenceManager.java:237)
       ... 36 more
----

Not sure what the deal is ... any clue and or similar work i could look at
to help ?

Note that the "same" code using jboss-transactions works (but I don't like
it much for other reasons)

Thanks.

Code ->

-- Bottstrapping --
       // Use external Transaction provider for Neo4j (Bitronix)
       Configuration conf = TransactionManagerServices.getConfiguration();
       conf.setServerId("Provisioning");

       Neo4jBtmProviderImpl neo4jBtmProvider = new Neo4jBtmProviderImpl();
       bind(Neo4jBtmProviderImpl.class).toInstance(neo4jBtmProvider);

       Map<String,String> params = new HashMap<String, String>();
       params.put(Config.TXMANAGER_IMPLEMENTATION,
Neo4jBtmProviderImpl.KEY);

--- jndi.properties --
java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory

-- I have made a transaction manager and registered it with Neo4j ---
/**
 * Provides Transaction management via Bitronix to Neo4j
 */
@Service.Implementation( TransactionManagerProvider.class )
public class Neo4jBtmProviderImpl extends TransactionManagerProvider
{
   public static String KEY = "btmTs";

   public Neo4jBtmProviderImpl()
   {
       super( KEY );
   }

   @Override
   public AbstractTransactionManager loadTransactionManager(String
txLogDir, KernelPanicEventGenerator kpe, TxFinishHook txFinishHook) {
       return new Neo4jBtmServiceImpl();
   }
}

----- And the impl ----
/**
 * Provides Transaction management via Bitronix to Neo4j
 */
public class Neo4jBtmServiceImpl extends AbstractTransactionManager {
   private final TransactionManager tm;

   public Neo4jBtmServiceImpl(){
       Properties props = new Properties();
       //props.put("hibernate.transaction.factory_class",
"org.hibernate.transaction.JTATransactionFactory");
       tm = TransactionManagerServices.getTransactionManager();
   }

   @Override
   public void init(XaDataSourceManager xaDsManager) {
       int bkpt=0;
       for(XaDataSource src: xaDsManager.getAllRegisteredDataSources()){
           Neo4jXAResourceProducer.registerXAResource(src.getName(),
src.getXaConnection().getXaResource());
       }
       for(XaDataSource src: xaDsManager.getAllRegisteredDataSources()){

//tm.getTransaction().enlistResource(src.getXaConnection().getXaResource());
           System.out.println(src.getName()+ " : "+
ResourceRegistrar.get(src.getName()));
       }
   }

   @Override
   public void stop() {
   }

   @Override
   public void begin() throws NotSupportedException, SystemException {
       tm.begin();
   }

   @Override
   public void commit() throws RollbackException, HeuristicMixedException,
HeuristicRollbackException, SecurityException, IllegalStateException,
SystemException {
       tm.commit();
   }

   @Override
   public int getStatus() throws SystemException {
       return tm.getStatus();
   }

   @Override
   public Transaction getTransaction() throws SystemException {
       Transaction t = tm.getTransaction();
       return t;
   }

   @Override
   public void resume(Transaction transaction) throws
InvalidTransactionException, IllegalStateException, SystemException {
       tm.resume(transaction);
   }

   @Override
   public void rollback() throws IllegalStateException, SecurityException,
SystemException {
       tm.rollback();
   }

   @Override
   public void setRollbackOnly() throws IllegalStateException,
SystemException {
       tm.setRollbackOnly();
   }

   @Override
   public void setTransactionTimeout(int i) throws SystemException {
       tm.setTransactionTimeout(i);
   }

   @Override
   public Transaction suspend() throws SystemException {
       return tm.suspend();
   }
}

--- And here is the producer (base on EhCacheProducer ---
public class Neo4jXAResourceProducer extends ResourceBean implements
XAResourceProducer {
   private static final Map<String, Neo4jXAResourceProducer> PRODUCERS =
new HashMap<String, Neo4jXAResourceProducer>();

   private final List<Neo4JResourceHolder> xaResourceHolders = new
ArrayList<Neo4JResourceHolder>();
   private RecoveryXAResourceHolder recoveryXAResourceHolder;
   private String uniqueName =
Neo4jXAResourceProducer.class.getCanonicalName();

   @Override
   public String getUniqueName() {
       return uniqueName;
   }

   /**
     * Register an XAResource of a cache with BTM. The first time a
XAResource is registered a new
     * EhCacheXAResourceProducer is created to hold it.
     * @param uniqueName the uniqueName of this XAResourceProducer, usually
the cache's name
     * @param xaResource the XAResource to be registered
     */
    public static void registerXAResource(String uniqueName, XAResource
xaResource) {
        synchronized (PRODUCERS) {
            Neo4jXAResourceProducer xaResourceProducer =
PRODUCERS.get(uniqueName);

            if (xaResourceProducer == null) {
                xaResourceProducer = new Neo4jXAResourceProducer();
                xaResourceProducer.setUniqueName(uniqueName);
                // the initial xaResource must be added before init() is
called
                xaResourceProducer.addXAResource(xaResource);
                xaResourceProducer.init();

                PRODUCERS.put(uniqueName, xaResourceProducer);
            } else {
                xaResourceProducer.addXAResource(xaResource);
            }
        }
    }

   public void setUniqueName(String uniqueName) {
       this.uniqueName = uniqueName;
   }

   /**
     * Unregister an XAResource of a cache from BTM.
     * @param uniqueName the uniqueName of this XAResourceProducer, usually
the cache's name
     * @param xaResource the XAResource to be registered
     */
    public static synchronized void unregisterXAResource(String uniqueName,
XAResource xaResource) {
        synchronized (PRODUCERS) {
            Neo4jXAResourceProducer xaResourceProducer =
PRODUCERS.get(uniqueName);

            if (xaResourceProducer != null) {
                boolean found =
xaResourceProducer.removeXAResource(xaResource);
            }
        }
    }


    private void addXAResource(XAResource xaResource) {
        synchronized (xaResourceHolders) {
            Neo4JResourceHolder xaResourceHolder = new
Neo4JResourceHolder(xaResource, this);

            xaResourceHolders.add(xaResourceHolder);
        }
    }

    private boolean removeXAResource(XAResource xaResource) {
        synchronized (xaResourceHolders) {
            for (int i = 0; i < xaResourceHolders.size(); i++) {
                Neo4JResourceHolder xaResourceHolder =
xaResourceHolders.get(i);
                if (xaResourceHolder.getXAResource() == xaResource) {
                    xaResourceHolders.remove(i);
                    return true;
                }
            }
            return false;
        }
    }

    /**
     * {@inheritDoc}
     */
    public XAResourceHolderState startRecovery() throws RecoveryException {
        synchronized (xaResourceHolders) {
            if (recoveryXAResourceHolder != null) {
                throw new RecoveryException("recovery already in progress
on " + this);
            }

            if (xaResourceHolders.isEmpty()) {
                throw new RecoveryException("no XAResource registered,
recovery cannot be done on " + this);
            }

            recoveryXAResourceHolder = new
RecoveryXAResourceHolder((XAResourceHolder) xaResourceHolders.get(0));
            return new XAResourceHolderState(recoveryXAResourceHolder,
this);
        }
    }

    /**
     * {@inheritDoc}
     */
    public void endRecovery() throws RecoveryException {
        recoveryXAResourceHolder = null;
    }

    /**
     * {@inheritDoc}
     */
    public void setFailed(boolean failed) {
        // cache cannot fail as it's not connection oriented
    }

    /**
     * {@inheritDoc}
     */
    public XAResourceHolder findXAResourceHolder(XAResource xaResource) {
        synchronized (xaResourceHolders) {
            for (int i = 0; i < xaResourceHolders.size(); i++) {
                Neo4JResourceHolder xaResourceHolder =
xaResourceHolders.get(i);
                    if (xaResource == xaResourceHolder.getXAResource()) {
                        return xaResourceHolder;
                    }
            }

            return null;
        }
    }

    /**
     * {@inheritDoc}
     */
    public void init() {
        try {
            ResourceRegistrar.register(this);
        } catch (RecoveryException e) {
            throw new BitronixRuntimeException("error recovering " + this,
e);
        }
    }

    /**
     * {@inheritDoc}
     */
    public void close() {
        synchronized (xaResourceHolders) {
            xaResourceHolders.clear();
            ResourceRegistrar.unregister(this);
        }
    }

    /**
     * {@inheritDoc}
     */
    public XAStatefulHolder createPooledConnection(Object xaFactory,
ResourceBean bean) throws Exception {
        throw new UnsupportedOperationException("EhCache is not
connection-oriented");
    }

    /**
     * {@inheritDoc}
     */
    public Reference getReference() throws NamingException {
        return new Reference(Neo4jXAResourceProducer.class.getName(),
                new StringRefAddr("uniqueName", getUniqueName()),
                ResourceObjectFactory.class.getName(), null);
    }

}
-- and the resource handler --
package com.teachscape.provisioning.transactional;

import bitronix.tm.resource.common.AbstractXAResourceHolder;
import bitronix.tm.resource.common.ResourceBean;

import javax.transaction.xa.XAResource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Neo4JResourceHolder extends AbstractXAResourceHolder {

   private final XAResource resource;
   private final ResourceBean bean;

   public Neo4JResourceHolder(XAResource resource, ResourceBean bean) {
       this.resource = resource;
       this.bean = bean;
   }

   /**
    * {@inheritDoc}
    */
   public XAResource getXAResource() {
       return resource;
   }

   /**
    * {@inheritDoc}
    */
   public ResourceBean getResourceBean() {
       return bean;
   }

   /**
    * {@inheritDoc}
    */
   public void close() throws Exception {
       throw new UnsupportedOperationException("EhCacheXAResourceHolder
cannot be used with an XAPool");
   }

   /**
    * {@inheritDoc}
    */
   public Object getConnectionHandle() throws Exception {
       throw new UnsupportedOperationException("EhCacheXAResourceHolder
cannot be used with an XAPool");
   }

   /**
    * {@inheritDoc}
    */
   public Date getLastReleaseDate() {
       throw new UnsupportedOperationException("EhCacheXAResourceHolder
cannot be used with an XAPool");
   }

   /**
    * {@inheritDoc}
    */
   public List getXAResourceHolders() {
       List xaResourceHolders = new ArrayList(1);
       xaResourceHolders.add(this);
       return xaResourceHolders;
   }

}



--
View this message in context: http://old.nabble.com/Trying-to-use-Bitronix-with-Neo4J-%28and-batis%29-tp32574926p32574926.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Trying to use Bitronix with Neo4J (and batis)

tcolar
In reply to this post by tcolar
While I haven't resolved the issue yet, I've found that Neo4J is not finding the XaResource because it's using equals() to check if it's the right one .... i seem to have the resource created twice, exact same data but different instances (found that while debugging)

I probably need to change my producer code to make sure there is only one instance is my guess, will look at it later.

 
Reply | Threaded
Open this post in threaded view
|

Re: Trying to use Bitronix with Neo4J (and batis)

Ludovic Orban-2
Please keep me posted about your progress and let me know if you need some help.

2011/10/2 tcolar <[hidden email]>

While I haven't resolved the issue yet, I've found that Neo4J is not finding
the XaResource because it's using equals() to check if it's the right one
.... i seem to have the resource created twice, exact same data but
different instances (found that while debugging)

I probably need to change my producer code to make sure there is only one
instance is my guess, will look at it later.


--
View this message in context: http://old.nabble.com/Trying-to-use-Bitronix-with-Neo4J-%28and-batis%29-tp32574926p32579464.html
Sent from the Bitronix Transaction Manager mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email