Hey, very good, some comments inline

One question that I have is regarding the Transaction Manager, who is
responsible for creating the transaction manager ? The SCA runtime, or
implementations ? In the case of SCA runtime, we need to investigate
that part, but I guess we can start by having it under the
implementation as a proof of concept for now.

On 9/13/07, Amita Vadhavkar <[EMAIL PROTECTED]> wrote:
> Hi,
> I have given this a try based on what I tried in JIRA-1665 (Sample Using
> JOTM with DAS)
> Here also I am using JOTM with SCA+DAS. Currently played with 2 simple
> intents:

I think we are going to use geronimo transaction manager with SCA
integration, and there is a sample on implementation.bepel on how to
use it, it's very simple, could you try using that one ?

> a> transaction (Tx management from External TM), b> noTransaction (Tx
> management from DAS)
>
> The only changes needed are as below:-
> A> tuscany-data-engine-helper:-
> 1)DataAccessEngineManager
> new method getDAS(String config, ConnectionInfo connectionInfo, List<Intent>
> intents, List<PolicySet> policySets)
> Here if intent "a>transaction" is detected, ConnectionInfo.setManagedTx(false)
> will be called.
> This modified connnectionInfo will be passed through configHelper to the new
> DAS instance.
> This way if external TM is going to manage Tx, DAS is signaled for it.
>

Great... I'll leave comments on the policy side to Venkat or Sebastien
or others that have been playing on this area...

> And logic to support this method
>
> 2) ConnectionInfo
> new attribute managedtx with setter/getter
>

Ok

> B> tuscany-implementation-das
> 1) DASImplementation implements PolicyAttachPoint
>
> 2) DASImplementationProcessor
> read(reader) - will read policies and intents on DASImplementation from
> .composite
>

Who should read here, implementation.das or we should delegate to the
policy artifact processors ?


> 3) DASImplementationProvider
> createInvoker() will call getDAS(passing config, connectioninfo, intents,
> policies)
> same will be for createCallbackInvoker()
>

What other information you will need from intents and policies when
creating DAS ? you already passed the managed transaction flag inside
the connectionInfo, right ? Note that there is still support for a das
config file, how are you going to manage that ? We probably need to
throw an exception if DAS config file sets does NOT set the managed
transaction flag, but transaction policy is set.

> With these above changes and with setup similar to JIRA-1665 sample, I could
> see
> that the external connection is being used by DAS (naming service is
> resolving
> datasource properly).
>
> The point I am stuck at is, in RDB-DAS, when we use external DS, we do not
> pass
> userName, password. But MYSQL (which with InnoDB supports Txn and works well
> with JOTM) does need id, pwd in ds.getConnection(). This can be case with
> other DBs as well.
>
> So, it looks like DAS config.xsd needs to allow passing userName, password
> in ConnectionInfo too ( and not just for ConnectionProperties).
>
> Thus below will be the changed DAS config portion:-
>    <xsd:complexType name="ConnectionInfo">
>       <xsd:sequence>
>         <xsd:element  maxOccurs="1" minOccurs="0"
> name="ConnectionProperties" type="config:ConnectionProperties"/>
>       </xsd:sequence>
>       <xsd:attribute name="dataSource" type="xsd:string"/>
>       <xsd:attribute name="managedtx" type="xsd:boolean" default="true"/>
>       <xsd:attribute name="userName" type="xsd:string" default=""/>
>       <xsd:attribute name="password" type="xsd:string" default=""/>
>    </xsd:complexType>
>
>    <xsd:complexType name="ConnectionProperties">
>          <xsd:attribute name="driverClass" type="xsd:string"/>
>          <xsd:attribute name="databaseURL" type="xsd:string"/>
>          <xsd:attribute name="loginTimeout" type="xsd:int"
> default="0"/>
>    </xsd:complexType>
>

Create a DAS jira for this, and we can investigate further...

> Suggestion? If this looks OK, I would like to make the above changes and
> create a sample in tuscany-implementation-das demoing use of intent and ext
> TM.

I have a demo in progress, probably is good to have a test case for
now, and we could incorporate transaction support on the demo.

> Will give a try with geronimo as well.


>
> Regards,
> Amita
>
> On 9/2/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote:
> >
> > [snip]
> > Luciano Resende wrote:
> > > I guess your suggestion for starting simple is fine, and I guess
> > > implementation.das could get integrated with SCA Policy and DAS would
> > > have the necessary support, unless we find some bugs on the DAS side.
> > > I'll see if I can get to this in the coming weeks...
> > >
> > > BTW, what transaction manager are we going to use in Tuscany ?  Do we
> > > have any today ?
> > >
> >
> > Two suggestions:
> > - in a standalone environment, use JOTM [1]
> > - in Geronimo, get the TM from Geronimo, as done in the Tuscany/Geronimo
> > plugin at [2]
> >
> > [1] http://jotm.objectweb.org/
> > [2] http://svn.apache.org/repos/asf/geronimo/plugins/tuscany
> >
> > --
> > Jean-Sebastien
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>


-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to