At JavaOne 2000 I presented a talk entitied Advanced Tx Processing II
(TS988).  Although the presentation is available from JavaSoft, the source
is not.

After the presentation a swarm of people came up asking for the source code.
Please find it, as well as deployable EAR and JAR files on the Sybase
newsgroups.

news://forums.sybase.com/powersoft.public.easerver

The posting has the subject of "JavaOne Advanced Tx Processing Presentation
Source Code"

This is built using EJB 1.1 and should contain (aside from the GUI) no
proprietary API's or classes and should be easily ported to 3rd party
containers.

The application is for a mock bank.  It shows a simple interaction between
Session Beans and Entity Beans using BMP (For CMP I reccomend CoCoBase from
Thought Inc which integrates well with most every app server including EAS).
It also allows you to configure the server to do XA distributed
transactions.

Requirements:  An app server (like Sybase EAS 3.6) capable of EJB 1.1
                   To see XA transactions, an app server (like Sybase EAS) capable of 
XA
               an XA JDBC driver, and an XA capable database
               A database
               Java2 VM

Installation:        The EAR and JAR can be deployed as needed in your
particular app server.  In EAS 3.6 you can use the deploytool or
JaguarManager.  You will need to set all EJB 1.1 resource ref's to point to
the appropriate connection caches.  For non-XA you only need to set the
primary caches.  The CustomerAccountEntity entity bean also has an
environment variable called "use_xa" which should be set to false unless you
have an XA capable database.

To run the client simply make sure that swingall.jar is in the classpath,
jndi.jar is in the classpath, and you're containers classes are in the
classpath (%JAGUAR%\html\classes for EAS).  Then configure the
environment.props file as needed.

The Goal:        This demo was designed to allow developers to experiment
with container managed transactions and declarative transactional settings.
For instance, a simple example is to transfer money from one account to
another user teller id'1'.  To show it is successful.  If you ever reach a
negetive balance, the tx will rollback.  If however you try to transfer
money as teller id '2' it may or may not fail.  If the Log component is set
to inherit the running tx (support or requires) then it will rollback as
there is a referential integrity constaint on the logging table.  However it
it is set to say requires new or not supported, it will now roll forward.
The demo also shows doing an update via the JTA and an XA transaction for
those containers capable.

This demo is provided as-is and all support is given via this newsgroup.
This is the first bundling of this demo so there may be issues.  Please let
me know in the newsgroup and Ill fix um!

news://forums.sybase.com/powersoft.public.easerver

Dave Wolf
Internet Applications Division

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to