Jagadish and Sivakumar,
there was a typo in the sun-ejb-jar.xml (I forgot to surround by <enterprise-beans>). Now I fixed it, so there is the next problem, now.
Now deploying with this fixed version of sun-ejb-jar.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN' '
http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd'>
<sun-ejb-jar>
<enterprise-beans>
<ejb>
<ejb-name>KernelConnectorBean</ejb-name>
<mdb-resource-adapter>
<resource-adapter-mid>SuperSimple#KernelConnector</resource-adapter-mid>
</mdb-resource-adapter>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
Now at deployment time in server.log I find another stack trace. It says, it cannot find my ActivationSpec class. In fact, the ActivationSpec class is contained in the RAR, and verifier.bat tells NO FAILURES (I am sending the RAR to your private address in separate email as a proof).
So there seems to be a class loader problem in GlassFish?
Thanks a lot!
Markus
-----Original Message-----
From: Sivakumar.Thyagarajan_at_Sun.COM [mailto:Sivakumar.Thyagarajan_at_Sun.COM]
Sent: Donnerstag, 26. Juni 2008 11:19
To: ejb_at_glassfish.dev.java.net
Subject: Re: @Resource / Help Needed
Hi Markus
>> Imagine my EAR is called a.ear and the RAR is called b.rar (found
>> inside a.ear), can you please tell me what to write exactly at each
>> place? The problem is with the links you provided, that it just
>> says "write xyz", but not WHERE to write that!
>> (1) Inbound Reference
>> @MessageDriven(/* what here to link it to the inbound? */)
>> or do I have to use sun specific deployment descriptors (and what
>> to write into it)?
For a EJB 3.0 MDB, the activation configuration properties can be
specified as part of @MessageDriven but the link between the MDB and the
resource adapter goes with the vendor-specific deployment descriptor. So
in addition to your EJB 3.0 MDB, please bundle a sun-ejb-jar.xml as
shown in
http://docs.sun.com/app/docs/doc/819-3672/beama?a=view and
specify a#b in the resource-adapter-mid element
So your sun-ejb-jar.xml would look like:
--- snip ---
<sun-ejb-jar>
<enterprise-beans>
...
<ejb>
<ejb-name>SampleMDB</ejb-name>
...
<mdb-resource-adapter>
<resource-adapter-mid>jmsra</resource-adapter-mid>
</mdb-resource-adapter>
...
</ejb>
...
</enterprise-beans>
...
</sun-ejb-jar>
--- snip ---
>> (2) Outbound Reference
>> @Resource(/* what here to link it to the outbound? */) private
>> CustomConnectionFactory theFactory;
The Resource should provide a mappedName pointing to the JNDI location
where your connector resource is bound to in JNDI.
So create a connector connection pool for a#b with say a name "foo" and
create a connector resource binding "foo" to "eis/FooName"
Now your custom connection factory attribute in the MDB can be
@Resource(mappedName="eis/FooName")
private CustomConnectionFactory theFactory;
>> (3) How to create the needed pool?
>> As I said, the EAR will not deploy since it cannot bind, so I
>> cannot create a pool AFTER deployment. What do do?
Let me try this locally and get back to you.
Thanks
--Siva.
Markus Karg wrote:
> Hello Sivakumar,
>
> thank you for posting this links.
>
> Unfortunately, I do know all of them so it doesn't solve my problem due to two facts: (A) it says WHAT to write but not WHERE to write that (B) it tells I shall create a pool after deployment, but the deployment fails sind the binding of the bean fails!
>
>
> My problem is like this:
>
> That links say that *after* deploying the EAR (containing the embedded RAR) I have to use some other admin command to create a connection pool. But the problem is that *at* deployment I get error messages that both references (@Resource to the outbound, @MessageDriven to the inbound) cannot be bound, so I have stack traces found in the log and the application is not loaded! Since the application is not loaded, I cannot call that admin command.
>
> If you want I can post the stack trace of the deploy command!
>
> See the problem?
>
> So what I'd like to do is to ask you for a very short but concise answer to each of the following situations. That should make me find the problem, I think. Would be great if you cold post the answers:
>
> Imagine my EAR is called a.ear and the RAR is called b.rar (found inside a.ear), can you please tell me what to write exactly at each place? The problem is with the links you provided, that it just says "write xyz", but not WHERE to write that!
>
>
> (1) Inbound Reference
>
> @MessageDriven(/* what here to link it to the inbound? */)
>
> or do I have to use sun specific deployment descriptors (and what to write into it)?
>
>
> (2) Outbound Reference
>
> @Resource(/* what here to link it to the outbound? */)
> private CustomConnectionFactory theFactory;
>
>
> (3) How to create the needed pool?
>
> As I said, the EAR will not deploy since it cannot bind, so I cannot create a pool AFTER deployment. What do do?
>
>
> Thank you so much!
> Markus
>
> -----Original Message-----
> From: Sivakumar.Thyagarajan_at_Sun.COM [mailto:Sivakumar.Thyagarajan_at_Sun.COM]
> Sent: Mittwoch, 25. Juni 2008 19:50
> To: ejb_at_glassfish.dev.java.net
> Cc: Markus Karg
> Subject: Re: @Resource / Help Needed
>
> Hi Markus
>
>>>> Can you please be so kind to help me with this problem?
>>>>
>>>> I am sure if you would provide just a step-by-step instruction
>>>> taylored to JUST embedded adapters, this would help me. Embedded
>>>> adapters are just shortly covered and I just do not understand the
>>>> existing documentation.
>
> Embedded resource adapters deployment is covered in [1]
>
> An embedded RA is referred using the template "AppName#EmbeddedRARname"
> as documented in the link above. Connector resources (connector
> connection pools/admin objects) can be created using that name while
> using the asadmin CLI. The resources for the embedded RARs can be
> created using the admin GUI as well and the embedded RARs should just
> show up in the drop-down list.
>
> [2] talks about how a MDB can be configured to listed to a resource
> adapter. For an embedded RAR, make your <resource-adapter-mid> in
> sun-ejb-jar.xml point to AppName#EmbeddedRARname
>
> Please let this list know should you face any issues while trying these out.
>
>>>> Or can you please kindly forward my request to the commercial
>>>> programmer support so they can send me a per incidence contract or
>>>> something?
>
> FYI: GlassFish support subscriptions related information is at [3] and
> per-incident based developer support is available off [4]
>
> Thanks
> --Siva.
>
> [1] http://docs.sun.com/app/docs/doc/819-3672/bealq?a=view
> [2] http://docs.sun.com/app/docs/doc/819-3672/beama?a=view
> [3] http://www.sun.com/service/applicationserversubscriptions/index.jsp
> and http://www.sun.com/software/products/appsrvr/support.jsp
> [4] http://developers.sun.com/services/expertassistance/
>
>
> Kenneth Saks wrote:
>> Hi Markus,
>>
>> I've forwarded this to some connector team members who should be able to
>> help.
>>
>> --ken
>>
>> On Jun 25, 2008, at 5:26 AM, Markus Karg wrote:
>>
>>> Dear EJB Team,
>>>
>>> sorry for bothering with user questions, but unfortunately nobody in
>>> the users forum was able to help me so you are my last hope.
>>>
>>> In my EAR I have an EJB-JAR and a resource adapter. The resource
>>> adapter provides inbound and outbound of custom interfaces (neither
>>> JMS nor JDBC). I need to bind a MDB found in the EJB-JAR to that
>>> embedded resource adapter (listening to inbound as it is an MDB) and
>>> some other EJBs in the same EJB-JAR to the outbound using @Resource.
>>>
>>> I have developed lots of RARs in the past, and used them within JOnAS
>>> for years. So my problem is mainly about GlassFishv2 configuration but
>>> not about programming.
>>>
>>> I checked all the online resources and forums, but still I am stuck. I
>>> just doesn't work, and more and more I am getting confused.
>>>
>>> Can you please be so kind to help me with this problem?
>>>
>>> I am sure if you would provide just a step-by-step instruction
>>> taylored to JUST embedded adapters, this would help me. Embedded
>>> adapters are just shortly covered and I just do not understand the
>>> existing documentation.
>>>
>>> Or can you please kindly forward my request to the commercial
>>> programmer support so they can send me a per incidence contract or
>>> something?
>>>
>>> I really need help!
>>>
>>> Thanks
>>> Markus
>>>
>>> QUIPSY QUALITY GmbH & Co. KG
>>> Ein Unternehmen der MES-Gruppe
>>> Stuttgarter Strasse 23
>>> D-75179 Pforzheim
>>> Tel: 07231-9189-52
>>> Fax: 07231-9189-59
>>> www.quipsy.de
>>> karg_at_quipsy.de
>>> Registergericht Mannheim HRA 701214
>>> Geschäftsführer: Nils Schroeder
>>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
---------------------------------------------------------------------
To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net