[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Few XA Questions...
by timfox
"clebert.suconic(a)jboss.com" wrote : - In what circunstance xaSession.end(xid, XAResource.TMFAIL) would be called?
|
| I have made this simple test. and I would expect a commit call to a failed xaSession throwing an exception:
|
| public void testFailXID() throws Exception
| | {
| | Xid xid = newXID();
| | ClientSession session = sessionFactory.createSession(true, false, false);
| | session.start(xid, XAResource.TMNOFLAGS);
| | session.end(xid, XAResource.TMFAIL);
| | session.commit(xid, true); // shouldn't this throw an exception?
| |
| | session.close();
| |
| | }
| |
|
| And this is more a question for TM guys:
|
I guess strictly we should be throwing an exception from commit since it should be rollback only, however in reality I suppose it would an error in the tx mgr if it called commit after ending with TMFAIL.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219622#4219622
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219622
17 years
[Design of JBossCache] - Re: Common marshalling infrastructure
by galder.zamarreno@jboss.com
Hey David, I've started to look into how to integrate JBoss Marshalling into JBoss Cache. Here's a list of things I wanted to ask you about:
1.- Would it be possible to upload source jars to the maven repo for next release?
2.- Looking at JBoss Marshalling, I saw that you're considering primitive arrays as known classes but primitive object arrays are not. Is this an oversight or on purpose? i.e.
map.put(Byte[].class, Protocol.ID_BYTE_ARRAY_CLASS);
| map.put(Boolean[].class, Protocol.ID_BOOLEAN_ARRAY_CLASS);
| map.put(Character[].class, Protocol.ID_CHAR_ARRAY_CLASS);
| ...
3.- Looks like collections like ArrayList, LinkedList, Hashmap, TreeMap...etc are treated as Serializable objects whereas JBoss Cache treats them differently. Instead, we look through the collection and see if it's an object we might want to marshall it in a diferent way to standard Serialization, i.e. a list of ReplicableCommand (ReplicableCommand does not implement Serializable). How would we deal with this?
4.- Also, JBC treats SingletonList instances separately by just copying the single object within them. Any plans to add this to JBoss Marshalling as well?
Other than this, JBoss Marshalling seems to contain the rest of optimisation JBC did for known type arrays, repeated objects, null values...etc. So, in spite of agreeing with Jason's statement in https://jira.jboss.org/jira/browse/JBCACHE-1336 earlier today:
anonymous wrote : It might be more useful to define type marshallers outside of the type since most of our magic numbers apply to types not under our control (JDK types).
I don't think this might apply any longer if the above points can be resolved. IOW, all types that are not under our control would already be handled by JBoss Marshalling which means that we can concentrate on our types and we could then use @Marshallable annotations.
FAO Manik: We talked earlier about the possibility of externalising magic numbers to a properties or XML but if we can stick to annotations, I think it would be cleaner and more natural. We could also make, @Marshallable inherited (http://java.sun.com/j2se/1.5.0/docs/api/java/lang/annotation/Inherited.html), then annotated subclasses would be covered and you'd be able to override the magic number if you needed different marshalling.
Thoughts?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219617#4219617
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219617
17 years