Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
JSP - A mailing list about Java Server Pages specification and reference
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Accessing Different DBs from State less EJB

Accessing Different DBs from State less EJB

2003-11-02       - By Anil Kumar

 Back
Reply:     1     2     3     4     5     6  

Hi Jorn,

Its working when I changed JDBC provider in database to XA Datasource.

Thanks for your help.

Anil

Christophe Thepaut <theo3285@(protected)> wrote:

Always good to learn new things. I�ll keep that one in mind.



Thx



Christophe

SCEA for J2EE





-- --Original Message-- --
From: An interest list for Sun Java Center J2EE Pattern Catalog [mailto
:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of J�rn �lmheim
Sent: Sunday, November 02, 2003 1:59 PM
To: J2EEPATTERNS-INTEREST@(protected)
Subject: Re: Accessing Different DBs from State less EJB



Hi.



You're on the right track here, Christophe, but not quite there.



The problem is as you correctly observe with transactions, but the problem

is with the database driver. This data base driver only one-phase commit,

and what you need when you use more than one resource in a transaction is

of course two-phase commit.



Anil: Switch to a database driver that supports XA connections (two-phase

commit), and that will solve your problem.



Best regards,

J�rn �lmheim

Senior Software Developer

Statoil ASA.







|-- -----+-- ---- ---- ---- ---- ---- ---- --->

|        |          Christophe Thepaut        |

|        |          <theo3285@(protected)>      |

|        |          Sent by: An interest list |

|        |          for Sun Java Center J2EE  |

|        |          Pattern Catalog           |

|        |          <J2EEPATTERNS-INTEREST@(protected)|

|        |          A.SUN.COM>                |

|        |                                    |

|        |                                    |

|        |          02.11.2003 09:55          |

|        |          Please respond to An      |

|        |          interest list for Sun Java|

|        |          Center J2EE Pattern       |

|        |          Catalog                   |

|        |                                    |

|-- -----+-- ---- ---- ---- ---- ---- ---- --->

 >-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
-- ---- ---- ---- ---- ---- ---|

 |                                                                            
                              |

 |       To:     J2EEPATTERNS-INTEREST@(protected)                          
                              |

 |       cc:     (bcc: J�rn �lmheim)                                          
                              |

 |       Subject:     Re: Accessing Different DBs from State less EJB        
                              |

 >-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
-- ---- ---- ---- ---- ---- ---|









Hi



Using the abstract factory with a DAO will not help. These patterns only

allow you to choose different databases with no or little changes on the

client side (SQL statements). Here your databases are DB2. You're fine

about it.



What you need here is to manage transactional behaviours. The exception is

pretty clear about it: An illegal attempt to use multiple resources that

have only one-phase capability has occurred within a global transaction.



Either you manage your transactions using EJBs (session beans in your case)

or a transactional middleware.



If you go with EJBs then you need to choose between Container Managed

Transaction and define transactional demarcation in the ejb-jar.xml

descriptor or Bean Managed Transaction and define transaction

programmatically using JTA. Beware that you can not use both. You need to

choose one or another and stick with it.



If you go with a transactional middleware such as BEA Tuxedo for instance

(IBM must have one but I can't recall) then you can not manage transactions

using EJBs.



What is a little scary about your issue here is that transactional

management should have been defined by your Architect in a Software

architecture document or/and in a Design Model.



Good luck.



Christophe

SCEA for J2EE





From: An interest list for Sun Java Center J2EE Pattern Catalog

[mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Anil Kumar

Sent: Sunday, November 02, 2003 7:22 AM

To: J2EEPATTERNS-INTEREST@(protected)

Subject: Re: Accessing Different DBs from State less EJB



Ashraf,



Iam  implementing DAO the same way as you told. I am following the core

J2EE design

patterns.



Thanks

Anil



ashraf galal <ashrafwg@(protected)> wrote:





    Anil;





    you must implement it usaing the abstract factory pattern.





    the pattern looks like the following class diagram:











    I hope this might help you.





    Best wishes





    Ashraf Galal





    EAI Senior Architect

    (416)804-8359

    >From: Anil Kumar

    >Reply-To: An interest list for Sun Java Center J2EE Pattern Catalog

    >To: J2EEPATTERNS-INTEREST@(protected)

    >Subject: Accessing Different DBs from State less EJB

    >Date: Sat, 1 Nov 2003 21:45:41 -0800

    >

    >Hi,

    >

    >I had a Stateless session Bean and DAO to access 4 databases. But as

    per my requirement I have to get data from different databases one

    after other in EJB.

    >I am getting data from First DB then when it is trying to create the

    statement for second DB its throwing the error.

    >

    >WTRN0062E: An illegal attempt to use multiple resources that have

    only one-phase capability has occurred within a global transaction.

    >

    >I am using Websphere application server (WSAD) with

    COM.ibm.db2.jdbc.app.DB2Driver

    >(JDBC 2.0) Database is DB2.

    >

    >

    >Please help me out

    >

    >Thanks a lot

    >Anil

    >

    >

    >

    >

    >-- ---- ---- ---- ---- ---- -----

    >Do you Yahoo!?

    >Exclusive Video Premiere - Britney Spears

    >

    >====================================================================

    >Companion Site: http://www.corej2eepatterns.com

    >J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns

    >List Archive:

    http://archives.java.sun.com/archives/j2eepatterns-interest.html

    >Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to

    listserv@(protected)





    Tired of spam? Get advanced junk mail protection with MSN 8.

    ====================================================================

    Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:

    http://java.sun.com/blueprints/corej2eepatterns List Archive:

    http://archives.java.sun.com/archives/j2eepatterns-interest.html

    Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to

    listserv@(protected)



Do you Yahoo!?

Exclusive Video Premiere - Britney Spears

====================================================================

Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:

http://java.sun.com/blueprints/corej2eepatterns List Archive:

http://archives.java.sun.com/archives/j2eepatterns-interest.html

Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to

listserv@(protected)





====================================================================

Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:

http://java.sun.com/blueprints/corej2eepatterns List Archive:

http://archives.java.sun.com/archives/j2eepatterns-interest.html

Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to

listserv@(protected)















-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----

The information contained in this message may be CONFIDENTIAL and is

intended for the addressee only. Any unauthorised use, dissemination of the

information or copying of this message is prohibited. If you are not the

addressee, please notify the sender immediately by return e-mail and delete

this message.

Thank you.

====================================================================

Companion Site: http://www.corej2eepatterns.com

J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns

List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html

Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

==================================================================== Companion
Site: http://www.corej2eepatterns.com J2EE BluePrints: http://java.sun.com
/blueprints/corej2eepatterns List Archive: http://archives.java.sun.com/archives
/j2eepatterns-interest.html Unsubscribing: email "signoff J2EEPATTERNS-INTEREST"
to listserv@(protected)

-- ---- ---- ---- ---- ---- -----
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears

====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)
<DIV>Hi Jorn,</DIV>
<DIV>&nbsp;</DIV>
<DIV>Its working when I changed JDBC provider in database to XA Datasource.<
/DIV>
<DIV>&nbsp;</DIV>
<DIV>Thanks for your help.</DIV>
<DIV>&nbsp;</DIV>
<DIV>Anil<BR><BR><B><I>Christophe Thepaut &lt;theo3285@(protected)&gt;</I></B>
wrote:</DIV>
<BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER
-LEFT: #1010ff 2px solid">
<META content="Microsoft Word 11 (filtered)" name=Generator>
<STYLE>
<!--
/* Font Definitions */
@(protected)
       {font-family:Tahoma;
       panose-1 (See http://ose-1.ora-code.com):2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
       {margin:0cm;
       margin-bottom:.0001pt;
       font-size:12.0pt;
       font-family:"Times New Roman";}
a:link, span.MsoHyperlink
       {color:blue;
       text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
       {color:purple;
       text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
       {margin:0cm;
       margin-bottom:.0001pt;
       font-size:10.0pt;
       font-family:Tahoma;}
@(protected) Section1
       {size:595.3pt 841.9pt;
       margin:70.85pt 109.5pt 70.85pt 109.5pt;}
div.Section1
       {page:Section1;}
-->
</STYLE>

<DIV class=Section1>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt">Always good to learn new things. I�ll keep that one in mind.</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt"></SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt">Thx</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt"></SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt">Christophe</SPAN></FONT></P>
<P class=MsoPlainText><I><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt; FONT-STYLE: italic">SCEA for J2EE</SPAN></FONT></I></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt"></SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN lang=EN-GB style="FONT
-SIZE: 10pt"></SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">--
---Original Message-- --<BR>From: An interest list for Sun Java Center J2EE
Pattern Catalog [mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of J�rn
�lmheim<BR>Sent: Sunday, November 02, 2003 1:59 PM<BR>To: J2EEPATTERNS-INTEREST
@(protected)<BR>Subject: Re: Accessing Different DBs from State less EJB</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">Hi
.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>You're on the right track here, Christophe, but not quite there.</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>The problem is as you correctly observe with transactions, but the problem<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">is
with the database driver. This data base driver only one-phase commit,</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>and what you need when you use more than one resource in a transaction is</SPAN
></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">of
course two-phase commit.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Anil: Switch to a database driver that supports XA connections (two-phase</SPAN
></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>commit), and that will solve your problem.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Best regards,</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>J�rn �lmheim</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Senior Software Developer</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Statoil ASA.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|-
-- ----+-- ---- ---- ---- ---- ---- ---- ---&gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Christophe Thepaut&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;theo3285@(protected)&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Sent by: An interest list |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; for Sun Java Center J2EE&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Pattern Catalog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; &lt;J2EEPATTERNS-INTEREST@(protected)|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; A.SUN.COM&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; 02.11.2003 09:55&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Please respond to An&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; interest list for Sun Java|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Center J2EE Pattern&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; Catalog&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">|-
-- ----+-- ---- ---- ---- ---- ---- ---- ---&gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp; &gt;-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- ---- ---- ---- ---- ---- ---- -----|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To:&nbsp;&nbsp;&nbsp;&nbsp;
J2EEPATTERNS-INTEREST@(protected)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc:&nbsp;&nbsp;&nbsp;&nbsp; (bcc:
J�rn �lmheim)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Subject:&nbsp;&nbsp;&nbsp;&nbsp; Re
: Accessing Different DBs from State less EJB&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp; &gt;-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
-- ---- ---- ---- ---- ---- ---- -----|</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">Hi
</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Using the abstract factory with a DAO will not help. These patterns only</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>allow you to choose different databases with no or little changes on the</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>client side (SQL statements). Here your databases are DB2. You're fine</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>about it.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>What you need here is to manage transactional behaviours. The exception is<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>pretty clear about it: An illegal attempt to use multiple resources that</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>have only one-phase capability has occurred within a global transaction.</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Either you manage your transactions using EJBs (session beans in your case)<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">or
a transactional middleware.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">If
you go with EJBs then you need to choose between Container Managed</SPAN></FONT
></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Transaction and define transactional demarcation in the ejb-jar.xml</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>descriptor or Bean Managed Transaction and define transaction</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>programmatically using JTA. Beware that you can not use both. You need to</SPAN
></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>choose one or another and stick with it.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">If
you go with a transactional middleware such as BEA Tuxedo for instance</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
(IBM must have one but I can't recall) then you can not manage transactions<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>using EJBs.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>What is a little scary about your issue here is that transactional</SPAN></FONT
></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>management should have been defined by your Architect in a Software</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>architecture document or/and in a Design Model.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Good luck.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Christophe</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>SCEA for J2EE</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>From: An interest list for Sun Java Center J2EE Pattern Catalog</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
[mailto:J2EEPATTERNS-INTEREST@(protected)] On Behalf Of Anil Kumar</SPAN></FONT
></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Sent: Sunday, November 02, 2003 7:22 AM</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">To
: J2EEPATTERNS-INTEREST@(protected)</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Subject: Re: Accessing Different DBs from State less EJB</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Ashraf,</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Iam&nbsp; implementing DAO the same way as you told. I am following the core<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>J2EE design</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>patterns.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Thanks</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Anil</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>ashraf galal &lt;ashrafwg@(protected)&gt; wrote:</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; Anil;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; you must implement it usaing the abstract factory
pattern.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; the pattern looks like the following class diagram:<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; I hope this might help you.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; Best wishes</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; Ashraf Galal</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; EAI Senior Architect</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; (416)804-8359</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;From: Anil Kumar</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Reply-To: An interest list for Sun Java Center J2EE
Pattern Catalog</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;To: J2EEPATTERNS-INTEREST@(protected)</SPAN></FONT
></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Subject: Accessing Different DBs from State less
EJB</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Date: Sat, 1 Nov 2003 21:45:41 -0800</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Hi,</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;I had a Stateless session Bean and DAO to access 4
databases. But as</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; per my requirement I have to get data from different
databases one</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; after other in EJB.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;I am getting data from First DB then when it is
trying to create the</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; statement for second DB its throwing the error.</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;WTRN0062E: An illegal attempt to use multiple
resources that have</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; only one-phase capability has occurred within a global
transaction.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;I am using Websphere application server (WSAD) with
</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; COM.ibm.db2.jdbc.app.DB2Driver</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;(JDBC 2.0) Database is DB2.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Please help me out</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Thanks a lot</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Anil</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;-- ---- ---- ---- ---- ---- -----</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Do you Yahoo!?</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Exclusive Video Premiere - Britney Spears</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;===================================================
=================</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Companion Site: http://www.corej2eepatterns.com<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;J2EE BluePrints: http://java.sun.com/blueprints
/corej2eepatterns</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;List Archive:</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; http://archives.java.sun.com/archives/j2eepatterns
-interest.html</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; &gt;Unsubscribing: email "signoff J2EEPATTERNS-INTEREST
" to</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; listserv@(protected)</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; Tired of spam? Get advanced junk mail protection with
MSN 8.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; =======================================================
=============</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; Companion Site: http://www.corej2eepatterns.com J2EE
BluePrints:</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; http://java.sun.com/blueprints/corej2eepatterns List
Archive:</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; http://archives.java.sun.com/archives/j2eepatterns
-interest.html</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to
</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">
&nbsp;&nbsp;&nbsp;&nbsp; listserv@(protected)</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">Do
you Yahoo!?</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Exclusive Video Premiere - Britney Spears</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">==
==================================================================</SPAN></FONT>
</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>http://java.sun.com/blueprints/corej2eepatterns List Archive:</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>http://archives.java.sun.com/archives/j2eepatterns-interest.html</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>listserv@(protected)</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">==
==================================================================</SPAN></FONT>
</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>http://java.sun.com/blueprints/corej2eepatterns List Archive:</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>http://archives.java.sun.com/archives/j2eepatterns-interest.html</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>listserv@(protected)</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"><
/SPAN></FONT>&nbsp;</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">--
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>The information contained in this message may be CONFIDENTIAL and is</SPAN><
/FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>intended for the addressee only. Any unauthorised use, dissemination of the<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>information or copying of this message is prohibited. If you are not the</SPAN>
</FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>addressee, please notify the sender immediately by return e-mail and delete<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>this message.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Thank you.</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt">==
==================================================================</SPAN></FONT>
</P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Companion Site: http://www.corej2eepatterns.com</SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns</SPAN></FONT><
/P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html<
/SPAN></FONT></P>
<P class=MsoPlainText><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: 10pt"
>Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)<
/SPAN></FONT></P></DIV>=========================================================
=========== Companion Site: http://www.corej2eepatterns.com J2EE BluePrints:
http://java.sun.com/blueprints/corej2eepatterns List Archive: http://archives
.java.sun.com/archives/j2eepatterns-interest.html Unsubscribing: email "signoff
J2EEPATTERNS-INTEREST" to listserv@(protected) </BLOCKQUOTE><p><hr SIZE=1>
Do you Yahoo!?<br>
Exclusive Video Premiere - <a href="http://launch.yahoo.com/video/?1093432&fs=1
&redirectURL=http://launch.yahoo.com/promos/britneyspears/">Britney Spears</a>
====================================================================
Companion Site: http://www.corej2eepatterns.com
J2EE BluePrints: http://java.sun.com/blueprints/corej2eepatterns
List Archive: http://archives.java.sun.com/archives/j2eepatterns-interest.html
Unsubscribing: email "signoff J2EEPATTERNS-INTEREST" to listserv@(protected)

©2008 junlu.com - Jax Systems, LLC, U.S.A.