Re: setResourceAdapter method in ManagedConnectionFactory
Bas van Oudenaarde <[email protected]> Thu, 18 Sep 2003 10:05:39 +0200
| Newsgroups | gmane.comp.java.sun.connector |
|---|---|
| Message-ID | <[email protected]> |
Thanks Binod,
I also thought it should not matter, but I will retry this scenario and
see what happens. I dumped below some part from the server.log, in here
you can see the other problem with ra.xml, I will raise this as
possible bug, although it deploys and works. See the deployment of the
Resource Adapter:
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.admin][1
2.September.2003 16:26:10:965 CEST][ADM6002:Received remote
administration request]>
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.deployme
nt][12.September.2003 16:26:11:145 CEST][Total Deployment Time: 135
msec, Total EJB Compiler Module Time: 0 msec, Portion spent EJB
Compiling: 0%]>
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.admin][1
2.September.2003 16:26:11:146 CEST][ADM5606:Extracting changes to
[/domain/applications/connector-module[@name='L1PXC_RA']]]>
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.admin][1
2.September.2003 16:26:11:146 CEST][ADM5604:Processing config change
[Domain:add to xpath=/domain/applications
childXPath = /domain/applications/connector-module[@name='L1PXC_RA']]]>
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.admin][1
2.September.2003 16:26:11:150 CEST][ADM1041:Sent the event to
instance:[ModuleDeployEvent -- deploy connector/L1PXC_RA]]>
<[SEVERE][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.deploy
ment][12.September.2003 16:26:11:287 CEST][XML Error line : 7
cvc-complex-type.2.4.a: Invalid content starting with element
'license'. The content must match
'((("http://java.sun.com/xml/ns/j2ee":description){0-
UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":display-name){0-
UNBOUNDED},("http://java.sun.com/xml/ns/j2ee":icon){0-
UNBOUNDED}),("http://java.sun.com/xml/ns/j2ee":vendor-name),("http://
java.sun.com/xml/ns/j2ee":eis-type),("http://java.sun.com/xml/ns/
j2ee":resourceadapter-version),("http://java.sun.com/xml/ns/
j2ee":license){0-1},("http://java.sun.com/xml/ns/
j2ee":resourceadapter))'.]>
MCF created
MCF created
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.admin][1
2.September.2003 16:26:11:353 CEST][ADM1042:Status of event to
instance:[success]]>
<[INFO][j2eesdk1.4_beta2][][][12][javax.enterprise.system.tools.admin][1
2.September.2003 16:26:11:380 CEST][ADM6002:Received remote
administration request]>
An other question as explained in the subject of this original mail, is
that I don't see any calls to the setResourceAdapter(). As you can see
MCF is created at deploytime, but the setResourceAdapter is not called
?!
Regards,
Bas
On Thursday, Sep 18, 2003, at 17:08 Europe/Amsterdam, Binod wrote:
> Hi Bas,
>
> I dont think we need to worry about the sun-ra.xml generated by
> deploytool.
> J2EE RI beta2 is , by design, capable of working without sun-ra.xml.
>
> Please raise a bug, if that is not the case.
>
> - Binod.
>
> On Thursday 18 September 2003 01:40 am, Bas van Oudenaarde wrote:
>> Hi Binod, Koij,
>>
>> Since this week I deployed my resource adapter, I had some problems
>> with the deployment of my JCA1.5 connector in J2EE RI B2, first I used
>> the adadmin tools:
>>
>> asadmin create-connector-connection-pool --user admin --raname
>> L1PXC_RA
>> --connectiondefinition javax.resource.cci.ConnectionFactory l1pxc_pool
>>
>> asadmin create-connector-resource --user admin --poolname l1pxc_pool
>> eis/L1_EIS
>>
>> There where some problem that my EJB could not find the Adapter. I
>> discovered that the deploytool generated a wrong sun-ra.xml file, so I
>> took the DTD from the Sun web-site and filled in the missing info,
>> since I also filled in the JNDI name it deploys when I use the
>> deploytool. So here is my modified sun-ra.xml :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE sun-connector PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE
>> Application Server 7.0 Connector 1.0/
>> /EN"
>> "http://www.sun.com/software/sunone/appserver/dtds/sun-connector_1_0-
>> 0.dtd">
>> <sun-connector>
>> <resource-adapter jndi-name="eis/L1_EIS">
>> <property name="host" value="145.146.98.56"/>
>> </resource-adapter>
>> </sun-connector>
>>
>> The deploytool generated :
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!DOCTYPE sun-connector PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE
>> Application Server 7.0 Connector 1.0//EN"
>> "http://www.sun.com/software/sunone/appserver/dtds/sun-connector_1_0-
>> 0.dtd">
>> <sun-connector/>
>>
>> Only the <property> element is filled in somehow by the deploymenttool
>> during deployment, I left empy <property/>
>>
>> I hope that this helps you,
>>
>> I will retry the asadmin way to see if this will work. First I need
>> to
>> solve an error in (the also generated) the ra.xml file, there is some
>> warning / error about the <licence> element, although it deploys.
>>
>> Regards,
>> Bas
>>
>> On Wednesday, Sep 17, 2003, at 16:34 Europe/Amsterdam, Binod wrote:
>>> Hi,
>>>
>>> You need to create a connection pool and connector resource using
>>> asadmin
>>> commands. Please take a look at the create-connector-connection-pool
>>> and
>>> create-connector-resource commands.
>>>
>>> - Binod,
>>>
>>> On Wednesday 17 September 2003 07:34 am, Koji Sekiguchi wrote:
>>>> Hi Binod,
>>>>
>>>> Thank you for your reply. How do I set a JNDI name
>>>> for a Connection Factory without sun-ra.xml?
>>>>
>>>> Thanks in advance,
>>>>
>>>> Koji
>>>>
>>>> On Wed, 17 Sep 2003 03:00:06 +0530, Binod <[email protected]> wrote:
>>>>> You dont need sun-ra.xml for J2EE1.4 RI beta2.
>>>>> - Binod.
>>>>>
>>>>> On Tuesday 16 September 2003 02:12 pm, Koji Sekiguchi wrote:
>>>>>> Hello,
>>>>>>
>>>>>> I want to write my own JCA1.5 adapter that runs on J2EE1.4 RI
>>>>>> Beta2. I tried to find a sample for sun-ra.xml for JCA1.5,
>>>>>> but couldn't. Has anybody succeeded in running your own
>>>>>> JCA1.5 adapter on J2EE1.4 RI? Is there good sample source
>>>>>> and DD for J2EE1.4 RI?
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Koji
>>>>>>
>>>>>> On Fri, 8 Aug 2003 21:38:57 +0530, Binod <[email protected]> wrote:
>>>>>>> According to PFD2 of connector specification, both
>>>>>>
>>>>>> ManagedConnectionFactory
>>>>>>
>>>>>>> interface and ActivationSpec interface need to implement
>>>>>>> ResourceAdapterAssociation interface. J2EE 1.4 Beta2 will
>>>>>>> execute
>>>>>>> setResourceAdapter on ResourceAdapterAssociation interface.
>>>>>>>
>>>>>>> So, Please make sure that your clases implement
>>>>>>
>>>>>> ResourceAdapterAssociation
>>>>>>
>>>>>>> intefrace.
>>>>>>>
>>>>>>> thanks,
>>>>>>> Binod
>>>>>>>
>>>>>>> On Thursday 07 August 2003 07:28 pm, Sandeep Rajpathak wrote:
>>>>>>>> I face this problem while using the SUN J2EE 1.4 Beta 2 RI.
>>>>>>>>
>>>>>>>> As per the JCA 1.5 specifications, the method
>>>>>>>> "setResourceAdapter"
>>>>>>
>>>>>> present
>>>>>>
>>>>>>>> in the ManagedConnectionFactory method is called by the
>>>>>>>> Application
>>>>>>
>>>>>> Server
>>>>>>
>>>>>>>> during the startup operation. However in the implementation
>>>>>>>> that I
>>>>
>>>> have
>>>>
>>>>>>>> done, this does not seem to be happening. In fact there is
>>>>>>>> another
>>>>>>
>>>>>> method
>>>>>>
>>>>>>>> called "setResourceAdapter" present in the ActivationSpec
>>>>>>>> interface
>>>>>>
>>>>>> which
>>>>>>
>>>>>>>> the implementation class overrides, but even this one is not
>>>>>>>> getting
>>>>>>>> called.
>>>>>>>>
>>>>>>>> Because this method does not get called there is no way for the
>>>>>>>> Outbound/Inbound handlers to get data-objects initialized during
>>>>>>>> the
>>>>>>>> ResourceAdapter startup. Infact I had to use the deprecated
>>>>>>>> Singleton
>>>>>>>> pattern for making these data-objects available to the various
>>>>
>>>> classes
>>>>
>>>>>> for
>>>>>>
>>>>>>>> ex. ManagedConnectionFactoryImpl, ConnectionImpl etc.
>>>>>>>>
>>>>>>>> What could possibly be the reasons for this method not getting
>>>>
>>>> called by
>>>>
>>>>>>>> the application server?
>>>>>>>>
>>>>>>>> Regards
>>>>>>>> Sandeep
>>>>
>>>> ====================================================================
>>>> ==
>>>> =====
>>>>
>>>>>>>> To unsubscribe, send email to [email protected] and include
>>>>>>>> in
>>>>
>>>> the
>>>>
>>>>>> body
>>>>>>
>>>>>>>> of the message "signoff CONNECTOR-INTEREST". For general help,
>>>>>>>> send
>>>>>>
>>>>>> email
>>>>>>
>>>>>>>> to [email protected] and include in the body of the
>>>>
>>>> message "help".
>>>>
>>>>> ===================================================================
>>>>> ==
>>>>> =====
>>>>>
>>>>>> =
>>>>>>
>>>>>>> To unsubscribe, send email to [email protected] and include
>>>>>>> in
>>>>>>> the
>>>>>>
>>>>>> body
>>>>>>
>>>>>>> of the message "signoff CONNECTOR-INTEREST". For general help,
>>>>>>> send
>>>>>>
>>>>>> email to
>>>>>>
>>>>>>> [email protected] and include in the body of the message
>>>>>>> "help".
>>>>>
>>>>> ===================================================================
>>>>> ==
>>>>> =====
>>>>
>>>> =
>>>>
>>>>> To unsubscribe, send email to [email protected] and include in
>>>>> the
>>>>
>>>> body
>>>>
>>>>> of the message "signoff CONNECTOR-INTEREST". For general help,
>>>>> send
>>>>
>>>> email to
>>>>
>>>>> [email protected] and include in the body of the message
>>>>> "help".
>>>
>>> =====================================================================
>>> ==
>>> ====
>>> To unsubscribe, send email to [email protected] and include in
>>> the
>>> body
>>> of the message "signoff CONNECTOR-INTEREST". For general help, send
>>> email to
>>> [email protected] and include in the body of the message "help".
>>
>> ======================================================================
>> =====
>> To unsubscribe, send email to [email protected] and include in
>> the body
>> of the message "signoff CONNECTOR-INTEREST". For general help, send
>> email
>> to [email protected] and include in the body of the message
>> "help".
>
> =======================================================================
> ====
> To unsubscribe, send email to [email protected] and include in the
> body
> of the message "signoff CONNECTOR-INTEREST". For general help, send
> email to
> [email protected] and include in the body of the message "help".
>
===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff CONNECTOR-INTEREST". For general help, send email to
[email protected] and include in the body of the message "help".