How to verify database connectivity

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to verify database connectivity

safraz
Hi,

I'm developing an application which has database-driver, url, username & password as selection/input. An XPL service is triggered to verify the database can be accessible to the given criteria. The accessibility (error/success) should be passed to the application.


I have started with the following...........

   <p:processor name="oxf:sql">
        <p:input name="datasource" href="#datasource"/>
        <p:input name="config">
            <sql:config>
                <sql:connection>
                               
                </sql:connection>
            </sql:config>
        </p:input>
                <p:output name="connection" ref="data" />
               
    </p:processor>


How can i achieve this?

Any Suggestions.......


Reply | Threaded
Open this post in threaded view
|

Re: How to verify database connectivity

Erik Bruchez
Administrator
If oxf:sql can't connect, it will throw an exception. That will cause
the service to return an error response. From XForms, you can check
the error code returned by a submission using
event('submission-status-code') upon xforms-submit-error.

-Erik

On Thu, Jul 23, 2009 at 3:16 AM, safraz<[hidden email]> wrote:

>
> Hi,
>
> I'm developing an application which has database-driver, url, username &
> password as selection/input. An XPL service is triggered to verify the
> database can be accessible to the given criteria. The accessibility
> (error/success) should be passed to the application.
>
>
> I have started with the following...........
>
>   <p:processor name="oxf:sql">
>        <p:input name="datasource" href="#datasource"/>
>        <p:input name="config">
>            <sql:config>
>                <sql:connection>
>                                <!-- WHAT SHOULD COME HERE -->
>                </sql:connection>
>            </sql:config>
>        </p:input>
>                <p:output name="connection" ref="data" />
>
>    </p:processor>
>
>
> How can i achieve this?
>
> Any Suggestions.......
>
>
>
> --
> View this message in context: http://www.nabble.com/How-to-verify-database-connectivity-tp24622970p24622970.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws