This is a pretty common JDBC scenario. I'm not sure why you would need to use the J2EE Connector Architecture here, though. I'm not a DB2 person, but I know that Oracle is XA compliant and implements the XA features in their JDBC adapters. Assuming DB2 also provides an XA compliant JDBC driver, then you can simply open two different JDBC connections (using JDBC DataSources) and perform straight JDBC calls to implement your scenario.
The Connector Architecture doesn't offer much value in your scenario (except maybe in the deployment of a JDBC DataSource -- see Sun's JDBC Connector for details on this). A JDBC Connector typically wraps a JDBC driver anyway. Moreover, if a database is XA compliant, then it will implement the javax.sql.XA* stuff in its JDBC driver. Oracle's JDBC examples demonstrate this: see http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc20/DistributedTransaction/DistributedTransaction.jar (you will need to be a member of Oracle's OTN to access this file)
Forgot to add one thing...
You'll need some way to indicate that you want to execute your transaction scenario in the context of a JTA transaction, such as using the JTA calls directly (component managed transactions) or by using container managed transactions in an EJB method with transaction attribute "Required" or "RequiresNew" depending on your application's needs.