On May 27, 2007, at 6:35 AM, ptriller wrote:
Well, that solves the problem, but I am deploying quite a number of
EJBs in my app, (namely MDBs listening to a Topic) and I really would
like to avoid to have to map the same resource 20 times. Is there
any "global" mapping possible as it is in the geronimo-web.xml ?
David Blevins may have introduced something like this for OpenEJB3 in
geronimo trunk, I'm not sure. There's nothing like this in geronimo
1.x. However if you name the resource the same as the resource-ref
you can just leave out the resource-ref in the geronimo plan.
That is,
<resource-ref>
<ref-name>jdbc/MyFooDataSource</ref-name>
<resource-link>jdbc/MyFooDataSource</resource-link>
</resource-ref>
can be omitted.
thanks
david jencks
Thanks
Peter
Aaron Mulder wrote:
The resource-ref element needs to go inside the session, entity, or
message-driven element for the EJB that declares the resource
reference. It looks like you have it as a direct child of openejb-
jar
instead.
Thanks,
Aaron
On 2/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Hi, all, many thanks in advance first.
I am try to deploy an EAR file that contains an EJB jar, I put
<resource-ref>
<ref-name>jdbc/MyDataSource</ref-name>
<resource-link>jdbc/MyRealDataSource</resource-
link>
</resource-ref>
in META-INF/openejb-jar.xml and got the following error message upon
deployment
Caused by: org.apache.xmlbeans.XmlException: Invalid deployment
descriptor:
[error: cvc-complex-type.2.4a: Expected elements
'[EMAIL PROTECTED]://www.openejb.org/xml/ns/openejb-jar-2.0
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/naming-1.0
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/security-1.1
[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/deployment-1.0' instead of
'[EMAIL PROTECTED]://geronimo.apache.org/xml/ns/naming-1.0' here]
Descriptor: <xml-fragment configId="myejb"
xmlns:open="http://www.openejb.org/xml/ns/openejb-jar-2.0"
xmlns:nam="http://geronimo.apache.org/xml/ns/naming-1.0">
<open:enterprise-beans>
<open:session>
<open:ejb-name>SomeEJBService</open:ejb-name>
<open:jndi-name>ejb/com/somwhere/SomeEJBHome</open:jndi-name>
</open:session>
</open:enterprise-beans>
<nam:resource-ref>
<nam:ref-name>jdbc/MyDataSource</nam:ref-name>
<nam:resource-link>jdbc/MyRealDataSource</nam:resource-link>
</nam:resource-ref>
</xml-fragment>
at
org.apache.geronimo.schema.SchemaConversionUtils.validateDD
(SchemaConversionUtils.java:594)
at
org.apache.geronimo.schema.SchemaConversionUtils.fixGeronimoSchema
(SchemaConversionUtils.java:365)
at
org.openejb.deployment.OpenEJBModuleBuilder.getOpenejbJar
(OpenEJBModuleBuilder.java:261)
... 34 more
--
View this message in context: http://www.nabble.com/How-do-I-put-
Resource-Reference-in-openejb-jar.xml--tf1123024s134.html#a10824831
Sent from the Apache Geronimo - Users mailing list archive at
Nabble.com.