users@glassfish.java.net

RE: _at_Resource / Help Needed

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Thu, 26 Jun 2008 09:15:16 +0530

Hi Markus,
* Can you post the deployment time error messages ?

*Please refer to my response for the steps.
https://glassfish.dev.java.net/servlets/ReadMsg?list=users&msgNo=20636

Infact, you can write your bean with
@Resource(name="connector-resource")
MyIntf intf

and deploy the application. Once the app. is deployed you can create a
pool and resource by name "connector-resource".

Thanks,
-Jagadish


On Wed, 2008-06-25 at 20:26 +0200, 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
>