Too bad that the whole world is more intretsed whether or not JBOSS will become J2EE certified.

I was reading an article about Unintended Consequences that made me think of the current J2EE cerification vs. JBOSS 4.0 with AOP.

In 1349 the black plague was spreading around Europe. In castles and universities and town halls across Europe, great minds pondered the cause of the plague.
And they came pretty close. The collective academic wisdom was that the source of the Black Plague was fleas.


So the word went out from town to town across Europe - to stop the plague - kill the fleas - by killing all the dogs. And immediately the slaughter of all dogs began.

But like lots of well-intentioned academic ideas it was somewhat wide of the mark...and had unexpected consequences. The cause was fleas all right, but not dog fleas...it was rat fleas. And in the 1300's what was the most effective way to hold down the rat population? You guessed it - dogs.
So by suggesting that townsfolk kill their dogs, the wise authorities had unwittingly allowed the rat population to flourish and thus a new vicious rash of Black Plague began.
Before it was over, three years later, nearly 1 out of 3 people in the world had died of the plague. (John Mauldin)


So in the quest to impove J2EE have you killed it?


marc fleury wrote:


do you motherfuckers realize how BIG this is?

no?

there is close to NOTHING in 20,000 pages of J2EE about this.

marcf



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bill Burke
Sent: Wednesday, March 26, 2003 7:09 PM
To: Jboss-Dev
Subject: [JBoss-dev] AOP versioned ACID objects 1st iteration



I have implemented a new AOP service for Serializable POJOs, Versioned Objects. You can transactionally version an object. If you modify the object within a transaction, this modification is not seen by other transactions. If the tx commits, the changes seen, if a rollback happens the changes are rolled back. On commit, if another tx has modified the object, the tx will rollback (OptimisticLocking).


The way it works is as follows:

POJO pojo = new POJO();
pojo = (POJO)org.jboss.aop.plugins.Versioned.makeVersioned(pojo);

calling Versioned.makeVersioned creates a proxy that sits in front of the real object.

transactionManager.begin();

pojo.callMethod();

when callMethod is invoked since there is a transaction, an interceptor creates a copy of the REAL pojo and does all further invocations on this copy.

pojo.someField = 5;

If you have field interception turned on, public field will also be accessed via the copy/version

tm.commit();

On commit, a tx Synchronization checks to see if the version you have created is the latest and greatest. If not an org.jboss.aop.plugins.OptimisticLockFailure exception is thrown in beforeCompletion. I'm not sure how this exception is wrapped.

Some other semantics:

1. All method invocations force a version to be created. You can avoid this by declared class-metadata as follows:

<class-metadata name="234234" group="VERSIONED" class="org.jboss.test.aop.bean.VersionedPOJO">
<method name="get.*">
<read-only>true</read-only>
</method>
</class-metadata>


A readonly method will not cause the creation of a version and the current object will be used.


An example and unit test is under testsuite/src/main/org/jboss/test/aop/bean/VersionedObjectTester.java


The example object VersionedPOJO.java, has 1 interceptor pointcut declared on the class to do Tx stuff. See testsuite/src/resources/aop/META-INF/jboss-aop.xml for more details.

What would be nice is to also write a TransactionalLock interceptor for versioned POJO's that have high OptimisticLock failures.

Bill




------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development






-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development





------------------------------------------------------- This SF.net email is sponsored by: The Definitive IT and Networking Event. Be There! NetWorld+Interop Las Vegas 2003 -- Register today! http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to