Java

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • AW: How to share a database connection between Tasks in ANT?

    2 answers - 1580 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Can you elaborate
    6/12/06, Jan.Materne (AT) rzf (DOT) fin-nrw.de <Jan.Materne (AT) rzf (DOT) fin-nrw.dewrote:
    some thoughts
    - datatypes support id/refid and are registered on the project
    --
    Jan
    Nachricht
    >Von: ashish shrivastava [mailto:ashish.indore (AT) gmail (DOT) com]
    >Gesendet: Montag, 12. Juni 2006 09:10
    >An: user (AT) ant (DOT) apache.org
    >Betreff: How to share a database connection between Tasks in ANT?
    >
    >I have a set of Tasks all requiring access to the very same
    >class instance (a db connection in practice). How can I
    >implement that with ANT?
    >

    So far, I have tried to implement this behaviour via a
    >TaskContainer but I can't get back the TaskContainer instance
    >from a Task, and hence the reference to the object I would
    >like to share via the TaskContainer, as far as the
    >TaskContainer and the Tasks are loaded in separate class loaders.
    >
    >I am converting a java based deploytool to ANT deployment
    >process.Theexisiting deploytool creates a connection pool and
    >then uses it subsequently to perform any database operation.I
    >am trying to implement the same.myimpression of SQL Task in
    >ANT is that i need to create a new connection each time for
    >performing DB operation.
    >
    >

    To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    For additional commands, e-mail: user-help (AT) ant (DOT) apache.org
    --
  • No.1 | | 1445 bytes | |

    some thoughts
    - datatypes support id/refid and are registered on the project

    Jan

    Nachricht
    >Von: ashish shrivastava [mailto:ashish.indore (AT) gmail (DOT) com]
    >Gesendet: Montag, 12. Juni 2006 09:10
    >An: user (AT) ant (DOT) apache.org
    >Betreff: How to share a database connection between Tasks in ANT?
    >
    >I have a set of Tasks all requiring access to the very same
    >class instance (a db connection in practice). How can I
    >implement that with ANT?
    >

    So far, I have tried to implement this behaviour via a
    >TaskContainer but I can't get back the TaskContainer instance
    >from a Task, and hence the reference to the object I would
    >like to share via the TaskContainer, as far as the
    >TaskContainer and the Tasks are loaded in separate class loaders.
    >
    >I am converting a java based deploytool to ANT deployment
    >process.Theexisiting deploytool creates a connection pool and
    >then uses it subsequently to perform any database operation.I
    >am trying to implement the same.myimpression of SQL Task in
    >ANT is that i need to create a new connection each time for
    >performing DB operation.
    >


    To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    For additional commands, e-mail: user-help (AT) ant (DOT) apache.org
  • No.2 | | 2657 bytes | |

    ashish shrivastava wrote:
    Can you elaborate

    have your tasks set the connection by setting a resource

    getProject().setResource("my.task.-secret-jdbc-resource",jdbcConnection);

    then let them fetch it later

    JDBCConnection conn=(JDBCConnection)
    getProject().getResource("my.task.-secret-jdbc-resource);

    the connection will last until the project goes away. This could be a
    bit long to hold a connection open, incidentally.

    By using spaces in the resource name, you shou

    6/12/06, Jan.Materne (AT) rzf (DOT) fin-nrw.de <Jan.Materne (AT) rzf (DOT) fin-nrw.dewrote:
    >>

    >some thoughts
    >- datatypes support id/refid and are registered on the project
    >>

    >
    >>
    >>

    >
    >>
    >>
    >>

    >Jan
    >>

    >Nachricht
    >>Von: ashish shrivastava [mailto:ashish.indore (AT) gmail (DOT) com]
    >>Gesendet: Montag, 12. Juni 2006 09:10
    >>An: user (AT) ant (DOT) apache.org
    >>Betreff: How to share a database connection between Tasks in ANT?
    >>
    >>I have a set of Tasks all requiring access to the very same
    >>class instance (a db connection in practice). How can I
    >>implement that with ANT?
    >>

    >So far, I have tried to implement this behaviour via a
    >>TaskContainer but I can't get back the TaskContainer instance
    >>from a Task, and hence the reference to the object I would
    >>like to share via the TaskContainer, as far as the
    >>TaskContainer and the Tasks are loaded in separate class loaders.
    >>
    >>I am converting a java based deploytool to ANT deployment
    >>process.Theexisiting deploytool creates a connection pool and
    >>then uses it subsequently to perform any database operation.I
    >>am trying to implement the same.myimpression of SQL Task in
    >>ANT is that i need to create a new connection each time for
    >>performing DB operation.
    >>
    >>

    >
    >To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    >For additional commands, e-mail: user-help (AT) ant (DOT) apache.org
    >>
    >>


    To unsubscribe, e-mail: user-unsubscribe (AT) ant (DOT) apache.org
    For additional commands, e-mail: user-help (AT) ant (DOT) apache.org

Re: AW: How to share a database connection between Tasks in ANT?


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Java"

EMSDN.COM