users@glassfish.java.net

RE: RE: RE: Re: How to bind _at_Resource to Outbound Resource Adapter?

From: Markus Karg <karg_at_quipsy.de>
Date: Wed, 25 Jun 2008 21:25:05 +0200

Jagadish,

thank you for taken the time.

Unfortunately what you write doesn't solve my problem:

You say that I shall go to admin-gui > resources > connectors *after* deployment, but since the bind is failing, the deployment is terminated with a stack trace! So I cannot do that!

@Resource(name="connector-resource-name") will not work as "connector-resource-name" is provided *after* deployment -- so at deployment time GlassFish tells me that this name is not existent and stops the deployment of the EAR!

So there must be a way to tell GlassFish that it shall create the pool automatically at deployment, before it is trying to bind @Resource to the outbound.


How to do that?

Thanks
Markus

-----Original Message-----
From: Jagadish.Ramu_at_Sun.COM [mailto:Jagadish.Ramu_at_Sun.COM]
Sent: Mittwoch, 25. Juni 2008 20:24
To: users_at_glassfish.dev.java.net
Subject: RE: RE: Re: How to bind @Resource to Outbound Resource Adapter?

Using @Resource is same for standalone as well embedded
resource-adapters.

For embedded: you will have an .ear which has ejbs/war as well .rars.
Name of the resource-adapter will be "earname#raName".

Once deployed, admin-gui >resources > connectors>
connector-connection-pool
will show the ra-name ("earname#raName")
Once you choose the RA, all connection-factories pertaining to that RA
will be shown.
eg: if your conn.factory interface is :
<connectionfactory-interface>javax.resource.cci.ConnectionFactory</connectionfactory-interface>

you will see javax.resource.cci.ConnectionFactory in the list.

you can create a connection-pool and corresponding connector-resource.

So, in your ejb, you can do
@Resource(name="connector-resource-name")
javax.resource.cci.ConnectionFactory cf;

Thanks,
-Jagadish


On Wed, 2008-06-25 at 09:21 +0200, Markus Karg wrote:
> I checked both documents that you mentioned, but still I do not understand what exactly I have to do to connect my @Resource to my embedded outbound. Can you please be so kind and provide the most simple sample or step-by-step instruction what exactly I have to do? I want to provide as much information as possible as annotations, least as possible as deployment descriptors, and if possible nobody shall configure anything at the customer's GlassFish installation (I want to provide a completey configured EAR). How to do that?
>
> Thanks
> Markus
>
> -----Original Message-----
> From: Jagadish.Ramu_at_Sun.COM [mailto:Jagadish.Ramu_at_Sun.COM]
> Sent: Montag, 23. Juni 2008 10:15
> To: users_at_glassfish.dev.java.net
> Subject: RE: Re: How to bind @Resource to Outbound Resource Adapter?
>
> If you are asking about embedded resource-adapters:
> http://docs.sun.com/app/docs/doc/819-3672/bealk?a=view
>
> For @Resource, you can refer:
> JavaEE tutorial >chapter 32 > Using @Resource annotations in Java EE
> components
>
> Thanks,
> -Jagadish
>
>
> On Mon, 2008-06-23 at 09:03 +0200, Markus Karg wrote:
> > No I have not done anything besides bundling my RAR within my EAR.
> >
> > I didn't know that I must create that manually.
> >
> > Is there a manual explaining what I have to do?
> >
> > Thanks
> > Markus
> >
> > -----Original Message-----
> > From: Jagadish.Ramu_at_Sun.COM [mailto:Jagadish.Ramu_at_Sun.COM]
> > Sent: Sonntag, 22. Juni 2008 16:46
> > To: users_at_glassfish.dev.java.net
> > Subject: Re: How to bind @Resource to Outbound Resource Adapter?
> >
> > Do you have a connector-resource & connector-connection-pool created ?
> > @Resource (name="connector-resource-name")
> > MyInterface intf
> >
> > should work.
> >
> > Thanks,
> > -Jagadish
> >
> >
> > On Thu, 2008-06-19 at 15:30 +0200, Markus Karg wrote:
> > > My EAR contains a beans that shall conntect to a outbound resource adapter.
> > >
> > > The beans do:
> > > @Resource MyInterface outbound;
> > >
> > > The resource adapter is found in a RAR contained in the same RAR.
> > >
> > > Question: How do I tell thatt MyInterface shall be bound to the RA?
> >
> > >
> > > 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
> > >
> > > Diese E-Mail enthält persönliche, vertrauliche und vor Weitergabe geschützte Informationen und ist ausschließlich für den vorgesehenen o.g. Empfänger (Adressaten) bestimmt. Falls Sie diese E-Mail versehentlich erhalten haben und nicht der vorgesehene Empfänger sind, bitten wir Sie, die E-Mail und deren Anhänge nicht aufzubewahren, nicht zu vervielfältigen, nicht zu nutzen und nicht weiterzugeben. Bitte informieren Sie uns als Absender über diesen Zustellungsfehler und löschen Sie die E-Mail.
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net