geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iñigo <...@nodo50.org>
Subject Re: deploy a client application
Date Wed, 31 Aug 2005 14:32:59 GMT
Well, I made some progress. Now Geronimo deploys the module, and when 
running the application with java -jar bin\client.jar I get this error:
javax.naming.NameNotFoundException jdbc/DataSource

However, in the deployment plan this is what I have:
    <resource-ref>
        <ref-name>jdbc/DataSource</ref-name>
        <target-name>MySQL</target-name>
    </resource-ref>
And in the application-client.xml:
    <resource-ref>
        <res-ref-name>MySQL</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
    </resource-ref>

And in the application:
            InitialContext ctx = new InitialContext();
            DataSource ds = 
(DataSource)ctx.lookup("java:comp/env/jdbc/DataSource");

I should lookup a different jndi name?

Jeremy Boynes escribió:

> Main-Class: com.example.Main
>
> How it gets in there depends on how your build creates the appclient 
> jar file - e.g. with ant you can specify manifest="${file}" on the jar 
> task.
>
> -- 
> Jeremy
>
>



Mime
View raw message