Announcement Announcement Module
Collapse

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions (http://www.springsource.org/extensions) project, this forum has been decommissioned in favour of Spring Extensions one at:
http://forum.springsource.org/forumdisplay.php?f=44

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Cheers,
Costin Leau
SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
http://twitter.com/costinl
See more
See less
jcr: transactions, jackrabbit and rmi Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • jcr: transactions, jackrabbit and rmi

    hi,
    when i try to use the spring transaction feature with springmodules-jcr (0.9) and a standalone jackrabbit server (1.4) which is connected via RMI, i'm running into an exception caused by a MarshallingException:

    java.io.NotSerializableException: org.springmodules.jcr.jackrabbit.support.JackRabbi tUserTransaction$XidImpl

    i'm following the example described in chapter 10.2.3.2. Jackrabbit RMI support of the documentation. so maybe it's a bug?

    however, when i extract the XidImpl-Class into it's own file, implement java.io.Serializable and overwrite the hashCode() and equals() methods like this:

    Code:
    	
    public int hashCode() {
    	return new String(globalTxId).hashCode();
    }
    
    public boolean equals(Object obj) {
    	if (this.getClass().equals( obj.getClass())) {
    		return this.hashCode() == obj.hashCode();
    	} else {
    		return false;
    	}
    }
    everything works like a charm. i'm very happy, i can use annotation-driven transactions for my jcr-services now.

  • #2
    jcr: transactions, jackrabbit and rmi

    ohh, btw i'm using the org.springmodules.jcr.jackrabbit.LocalTransactionM anager

    can someone please confirm that the MarshallingException is not a bug and that i really have to use jta-transactions when using a rmi-connected jackrabbit server?

    without jta (and with the patch i described in the previous post) the configuration is much simpler. and for our current project the advanced jta-features like distributed transactions are not needed.

    best regards,
    tim

    Comment

    Working...
    X