I've added comments in line: ...ant
On 10/18/06, Amita Vadhavkar <[EMAIL PROTECTED]> wrote:
Thanks a lot Ant. I am going through this and also have a few quesitons. There is a JIRA http://issues.apache.org/jira/browse/TUSCANY-864 which is in wish list for DAS and SCA integration. Shall we use the same for any work on the current topic or have a specific JIRA for the JDBC stored procedure container using DAS.
I think you should raise another JIRA for this specific item and we can link that to TUSCANY-864 Also,
The SCA assembly model spec talks about A composite reference can be used to access db stored procedure - will you please provide some details.
Thats interesting I'd not remembered seeing this in the spec (fyi- 2nd paragraph page 43, 2nd para page 63, and 5th para page 64). There's no other publicly available spec docs about this that I know of, would be interesting to hear from any of the spec people if there has been anymore done on data base stored procedures. Those spec references talk about using an SCA binding for data base stored procedures where as I was thinking of it being a component implementation. Again the spec people may be able to leap in and say why one is more appropriate than the other. If there's any way the container could make use of properties or references then the component implementation makes more sense to me but if not I guess a binding would work fine. And,
How extensibility mechanism is supported in SCA, some pointers for this.
I'm not sure I understand what your'e asking here. If its about how to extend Tuscany have a look at some of the container code I gave links to in the previous note. Specifically how it works is the binding or container extension has a default.scd file which defines the classes being plugged in, eg: https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/services/containers/container.javascript/src/main/resources/META-INF/sca/default.scdl In there you can see org.apache.tuscany.container.javascript.JavaScriptImplementationLoader adds the JavaScript loader which is the part that enables Tuscany to understand the SCDL which uses <js:implementation.js script="...">. Regards,
Amita On 10/18/06, ant elder <[EMAIL PROTECTED]> wrote: > > Thats really great you'd like to look at this Amita. I don't know how much > you've already looked at this or Tuscany so I'm going to give some > pointers > about how I'd approach this. > > There's two parts you need to do, how to use DAS to call stored > procedures, > and how to plug that DAS code into Tuscany. > > The DAS function is described at > http://wiki.apache.org/ws/WorkingWithStoredProcedures#preview > > There's a DAS testcase that uses stored procedures: > > https://svn.apache.org/repos/asf/incubator/tuscany/java/das/rdb/src/test/java/org/apache/tuscany/das/rdb/test/StoredProcs.java > > Based on that I guess you should try to write a simple function that > invokes > a stored procedure using DAS so you learn whats required to set things up > and do the invoke, how to configure DAS pragmatically, and all the > dependencies it requires etc. > > Early on I'd make a sample to use as a functional test so you know what > you're trying to get to work, something like: > > https://svn.apache.org/repos/asf/incubator/tuscany/java/samples/sca/helloworldJavaScript/ > , > or any of the other samples in java/samples/sca. Based on that you need to > come up with a new SCDL implementation element for describing the stored > procedure. We use helloworld or calculator samples for a lot of things, > initially it may be easiest to do something close to what the DAS tests do > eg, GETNAMEDCOMPANY. The Javascript helloworld sample is here: > > https://svn.apache.org/repos/asf/incubator/tuscany/java/samples/sca/helloworldJavaScript/src/main/resources/META-INF/sca/default.scdl > > I wouldn't worry to much about the details of the scdl yet, just get > something going and the final form can be discussed on the mailing list. > > To plug that into Tuscany you need to write a container, there's some > existing ones at: > > https://svn.apache.org/repos/asf/incubator/tuscany/java/sca/services/containers/ > > (don't use the spring one as its a bit different to what you want). The > vast > majority of the code is boiler plate stuff you can just copy unchanged > > So to start, copy one of those existing container projects, and one of > those > existing sample projects, rename everything so the names include something > about das or rdb or stored procedures, don't worry about the names as it > can > easily be refactored later, and then start trying to fit in your DAS code. > > Hope this is of some help, let us know how you get on or if you get stuck > anywhere. If you want to keep this in our svn as you develop it open a > JIRA > and attach files to it and we can put them in the sandbox. > > ...ant > > On 10/16/06, Amita Vadhavkar <[EMAIL PROTECTED] > wrote: > > > > Hi, > > > > I am new to Tuscany but am interested in looking into this rightaway as > I > > have some time. I hope to be bugging you folks soon for help as I get to > > understand and do this. > > > > Regards, > > Amita > > > > On 10/16/06, ant elder <[EMAIL PROTECTED] > wrote: > > > > > > I was reviewing the DAS user guide and reading the section about using > > DAS > > > with stored procedures: > > > http://wiki.apache.org/ws/WorkingWithStoredProcedures#preview , and > > > wondered > > > wouldn't it be useful to have an SCA component implemented by a stored > > > procedure? How about implementing a container for this (not for M2 of > > > course). Using the DAS stored procedure capabilities would make > > > implementing > > > this quite easy, and it would help get a bit more interaction going > > > between > > > the SCA and DAS people. > > > > > > Any one interested in having a look at this? > > > > > > ...ant > > > > > > > > > > > >