geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ptriller <ptril...@soapwars.de>
Subject Re: How do I put Resource Reference in openejb-jar.xml?
Date Sun, 27 May 2007 13:35:17 GMT

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 ?


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, yskim@symcor.com <yskim@symcor.com> 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
>> 'relationships@http://www.openejb.org/xml/ns/openejb-jar-2.0
>> message-destination@http://geronimo.apache.org/xml/ns/naming-1.0
>> security@http://geronimo.apache.org/xml/ns/security-1.1
>> gbean@http://geronimo.apache.org/xml/ns/deployment-1.0' instead of
>> 'resource-ref@http://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.


Mime
View raw message