Hi Frank, sorry for the confusing, it can not be added to the
application.xml, but should be added to the web.xml / ejb-jar.xml...

here is an example in attachment.

HTH

rex.


2009/5/4 fmeili <[email protected]>

>
>
>
> Rex Wang-2 wrote:
> >
> > hi frank
> >
> > This should be add to the application.xml(not geronimo-application.xml),
> > coz
> > it is NOT Geronimo specific. It is the JEE specific.
> > <resource-ref>
> >    <res-ref-name>jdbc/__mes</res-ref-name>
> >    <res-type>javax.sql.DataSource</res-type>
> >    <res-auth>Container</res-auth>
> >    <res-sharing-scope>Shareable</res-sharing-scope>
> > </resource-ref>
> >
> > HTH
> >
> > Rex
> >
>
>
> Hi Rex,
>
> thanks for the answer. But when I add this to the "application.xml" I get
> an
> error, that this element is not allowed here. After looking to the
> http://java.sun.com/xml/ns/javaee/application_5.xsd I couldn't find any
> hint
> about the <resource-ref> tag inside the application.xml.
>
> I couldn't find any hint about the <resource-ref> inside an application.xml
> even not in the JaveEE5 specification.
>
> Have you tried this?
>
> Thanks,
>  Frank
>
> --
> View this message in context:
> http://www.nabble.com/%22Could-not-auto-map-to-resource%22-problem-when-using-EJB-annotations-only-tp23316686s134p23368822.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>
1
in web console -> DB Manager Portlet
create DB: RexDB


2
Run the following SQL:

CREATE TABLE RexTable
  (EMPNO NUMERIC(4) PRIMARY KEY NOT NULL,
   ENAME VARCHAR(10));

INSERT INTO RexTable VALUES
  (3333,'JONES');
INSERT INTO RexTable VALUES
  (2222,'SMITH');

3
-> Database Pools portlet
-> Using the Geronimo database pool wizard 
   Name of Database Pool : RexDS
   Database Type: Derby embeded
-> select the driver jar & input Database Name: RexDB

Attachment: EMPEar.ear
Description: Binary data

Reply via email to