Results 1 to 6 of 6
  1. #1
    suchirag is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default access database connectivity from outside an application

    Hi,
    I am trying to look for a solution where i need to develop an application component which i need to pluggin to an exisitng application.But the thing is that application component needs to access database for fetching data.So the thing is how will that component access the database based on the type of database connectivity framework used in the existing application.And i dont want to hardcode the database connectivity in the component because each application can have different type of database connectivity frameworks.

    If anybody can help me out with this.

    Regards,
    Suchira

  2. #2
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Add a getConnection method to the public interface for your application and have the plugin use that.

  3. #3
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    If the existing application already accesses the database, why does the component need to access as well? Why can't it request the data it needs from the application that is already connecting?

    Edit: Masi is fast today
    Last edited by r035198x; 10-29-2009 at 08:44 AM.

  4. #4
    suchirag is offline Member
    Join Date
    Oct 2009
    Posts
    2
    Rep Power
    0

    Default

    Hi,

    Actually the thing is if the existing application is connecting to some other db and the component needs to connect to another db then in that case howz that possible

    Regards,
    Suchira

  5. #5
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Then the plugin has to do it itself, of course. Or you have to include the name of the driver class, the url, the user, and the password as arguments to the interface method and hope that the driver jarfile is in the classpath.

  6. #6
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

    Default

    Then you need to explain more clearly because you are skirting on the edges of contradiction.
    You asked
    how will that component access the database based on the type of database connectivity framework used in the existing application
    but then also you also said
    each application can have different type of database connectivity frameworks
    Do you have one application that you are writing the component for?
    How many types of database connectivity frameworks are in play here?
    What is a database connectivity framework?

Similar Threads

  1. Database access in bluetooth application
    By abhijit in forum JDBC
    Replies: 0
    Last Post: 09-21-2009, 12:43 PM
  2. Database connectivity
    By rajiparth in forum JDBC
    Replies: 1
    Last Post: 04-07-2009, 08:39 PM
  3. DSN less connectivity to Ms ACCESS
    By sayan751 in forum Advanced Java
    Replies: 2
    Last Post: 03-28-2009, 05:27 PM
  4. database connectivity
    By rilwanfit in forum Networking
    Replies: 1
    Last Post: 03-13-2009, 08:54 PM
  5. database connectivity
    By vani in forum Eclipse
    Replies: 0
    Last Post: 11-21-2008, 11:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •