Good ideia.... I´ll do it.

On 2/9/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:

I have an idea to make it more independent. Each one that wants to help to
implement this simple app, evaluate which class is intended to implement
and
create a new JIRA for it. In this new JIRA should be described the classes
and their methods that will be implemented. This way if someone finish to
implement certain classes, he will be able to choose another classes to
implement, instead of waiting for others to finish their classes. I think
this way we may speed up the das c++ coding.

Please, if a new JIRA is created report it here in this thread.

Adriano Crestani

On 2/8/07, Douglas Leite <[EMAIL PROTECTED]> wrote:
>
> Okay Adriano.... I will try to understand the simple application that
> you´ve
> posted, step by step, and after that I will choose some useful classes
as
> well as their essentials methods to run that application in C++.
>
> Douglas S. Leite
>
> On 2/8/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:
> >
> > Yes Luciano, but I wasn't sure if there would be any problem if the
> config
> > classes wouldn't be included. We will try to run it without the config
> > classes though.
> >
> > Douglas, as I had assigned the config classes to you just pick some
> > classes
> > from those I've assigned to the others. Or if you have another
> suggestion
> > in
> > what you could be useful just let us know.
> >
> > Adriano Crestani
> >
> > On 2/8/07, Luciano Resende <[EMAIL PROTECTED]> wrote:
> > >
> > > I'd agree with Kevin's suggestion, for a simple C++ sample
application
> > > that
> > > only performs a simple read, you shouldn't need the config classes,
> try
> > to
> > > do in C++ something simple as the java sample you just posted here.
> > >
> > > As for downloads, you only need to download the DAS distribution,
that
> > > will
> > > contain all the SDO and other dependencies inside the zip. For the
new
> > > people, I'd recommend using the stable M2 distributions, although I
> > think
> > > SDO and DAS trunk code are stable and compiling fine.
> > >
> > > --
> > > Luciano Resende
> > > http://people.apache.org/~lresende
> > >
> > > On 2/8/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:
> > > >
> > > > A correction, there is need to download the das also, not only the
> sdo
> > > > .jar:
> > > > http://incubator.apache.org/tuscany/das_downloads.html
> > > >
> > > > On 2/8/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:
> > > > >
> > > > > Anyway, it simplified a lot the ap ; )
> > > > >
> > > > > On 2/8/07, Adriano Crestani <[EMAIL PROTECTED]> wrote:
> > > > > >
> > > > > > Thanks a lot kevin ; ). But I think it look likes the first
code
> I
> > > > > > posted, except by the assert you added.
> > > > > >
> > > > > > Adriano Crestani
> > > > > >
> > > > > > On 2/8/07, Kevin Williams <[EMAIL PROTECTED]> wrote:
> > > > > > >
> > > > > > > Your focus should probably be on the APIs your DAS will
> provide
> > > the
> > > > > > > user
> > > > > > > whether that is from a servlet or some other caller.  Here
are
> > the
> > > > > > > Java
> > > > > > > DAS apis from the simplest possible read in the test suite:
> > > > > > >
> > > > > > >         /**
> > > > > > >          * Read a specific customer
> > > > > > >          */
> > > > > > >         public void testReadSingle() throws Exception {
> > > > > > >
> > > > > > >             // Create and initialize command to read
customers
> > > > > > >             DAS das = DAS.FACTORY.createDAS
(getConnection());
> > > > > > >             Command readCustomers = das.createCommand
("select
> *
> > > from
> > > > > > >     CUSTOMER where ID = 1");
> > > > > > >
> > > > > > >             // Read
> > > > > > >             DataObject root = readCustomers.executeQuery();
> > > > > > >
> > > > > > >             // Verify
> > > > > > >             assertEquals(1, root.getInt("CUSTOMER[1]/ID"));
> > > > > > >         }
> > > > > > >
> > > > > > > Notice that this example also does not allow parameterized
> > > > queries.  I
> > > > > > >
> > > > > > > would make this simplifying assumption to get something up
and
> > > > > > > running.
> > > > > > >
> > > > > > > I cannot help with the C++ equivalent of JDBC Connection but
I
> > am
> > > > sure
> > > > > > > there is something similar available.
> > > > > > >
> > > > > > > --
> > > > > > > Kevin
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > Adriano Crestani wrote:
> > > > > > >
> > > > > > > > Good idea kelvin, but I'm begginer in servlet and I don't
> know
> > > > what
> > > > > > > > would be
> > > > > > > > the best way for the user to provide the connection and
sql.
> > > > Though
> > > > > > > I
> > > > > > > > tried
> > > > > > > > this:
> > > > > > > >
> > > > > > > > import java.io.IOException;
> > > > > > > > import java.sql.DriverManager;
> > > > > > > >
> > > > > > > > import javax.servlet.ServletException;
> > > > > > > > import javax.servlet.http.HttpServlet;
> > > > > > > > import javax.servlet.http.HttpServletRequest ;
> > > > > > > > import javax.servlet.http.HttpServletResponse;
> > > > > > > >
> > > > > > > > import org.apache.tuscany.das.rdb.Command;
> > > > > > > > import org.apache.tuscany.das.rdb.DAS;
> > > > > > > >
> > > > > > > > import commonj.sdo.DataObject;
> > > > > > > >
> > > > > > > > public class CommandServlet extends HttpServlet {
> > > > > > > >
> > > > > > > >    private static final long serialVersionUID =
> > > > > > > 1922159305255311505L;
> > > > > > > >
> > > > > > > >    public CommandServlet() {}
> > > > > > > >
> > > > > > > >    protected void doGet(HttpServletRequest arg0,
> > > > HttpServletResponse
> > > > > > >
> > > > > > > > arg1)
> > > > > > > > throws ServletException, IOException {
> > > > > > > >        DataObject items = test(getConnection(), "SELECT id
> > FROM
> > > > item
> > > > > > > > WHERE
> > > > > > > > id = 1;");
> > > > > > > >        System.out.println("id = " + items.getInt
> > ("ITEM[1]/ID"));
> > > > > > > >
> > > > > > > >    }
> > > > > > > >
> > > > > > > >    public DataObject test(java.sql.Connection conn, String
> > > > readSql)
> > > > > > > {
> > > > > > > >        DAS das = DAS.FACTORY.createDAS(conn);
> > > > > > > >
> > > > > > > >        Command command = das.createCommand();
> > > > > > > >        DataObject allItems = command.executeQuery();
> > > > > > > >
> > > > > > > >        return allItems;
> > > > > > > >
> > > > > > > >    }
> > > > > > > >
> > > > > > > >    }
> > > > > > > >
> > > > > > > > }
> > > > > > > >
> > > > > > > > Adriano Crestani
> > > > > > > >
> > > > > > > > On 2/8/07, Kevin Williams <[EMAIL PROTECTED]> wrote:
> > > > > > > >
> > > > > > > >>
> > > > > > > >> You could actually start significantly simpler by making
> the
> > > > > > > following
> > > > > > > >> assumptions:
> > > > > > > >>
> > > > > > > >>    1. Read of a single table
> > > > > > > >>    2. User provides SQL programatically
> > > > > > > >>    3. User provides Connection programatically
> > > > > > > >>
> > > > > > > >> With these restrictions you can get something useful
> working
> > > > > > > without the
> > > > > > > >> classes required for config-file support.
> > > > > > > >>
> > > > > > > >> --
> > > > > > > >> Kevin
> > > > > > > >>
> > > > > > > >>
> > > > > > > >> Adriano Crestani wrote:
> > > > > > > >>
> > > > > > > >> > Luciano suggested to implement at first, the necessary
> > > classes
> > > > to
> > > > > > >
> > > > > > > >> > create a
> > > > > > > >> > simple app that only reads from a database using the
das
> > c++.
> > > I
> > > > > > > was
> > > > > > > >> > checking
> > > > > > > >> > on the das java that these classes below are essential
to
> > > > create
> > > > > > > this
> > > > > > > >> > app.
> > > > > > > >> >
> > > > > > > >> > DAS
> > > > > > > >> > DASFactory
> > > > > > > >> > DASImpl
> > > > > > > >> > ConfigFactory
> > > > > > > >> > ConfigFactoryImpl
> > > > > > > >> > Config
> > > > > > > >> > MappingWrapper
> > > > > > > >> > config.Command
> > > > > > > >> > ReadCommandImpl
> > > > > > > >> > Command
> > > > > > > >> > CommandImpl
> > > > > > > >> > ConnectionInfo
> > > > > > > >> >
> > > > > > > >> >
> > > > > > > >> > All these classes may be found in das java. I'm needing
> > some
> > > > > > > >> > volunteers to
> > > > > > > >> > help implement these classes in c++. Actually, these
> > classes
> > > > are
> > > > > > > >> > implemented, but are not compiling yet. So we need
these
> > > > classes
> > > > > > > >> > compiling
> > > > > > > >> > and implement a simple read app with these classes.
> > > > > > > >> >
> > > > > > > >> > Any suggestion will be appreciated.
> > > > > > > >> >
> > > > > > > >> > Adriano Crestani
> > > > > > > >> >
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > > >>
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > >> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> > > > > > > >> For additional commands, e-mail:
> > [EMAIL PROTECTED]
> > > > > > > >>
> > > > > > > >>
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > > > > > > For additional commands, e-mail:
> [EMAIL PROTECTED]
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to