On 30 Jan, Toby Allsopp wrote:
> "Marc T. Calello" wrote:
>> 
>> I believe that the JCA spec changed since the BlackBox sample
>> ResourceAdapter
>> was implemented.  According to JCA 1.0 section 5.4.1.
>> I should deploy and EJB with a ResourceReference tag that
>> refers to the specific ConnectionFactory implemetation
>> class for my RAR.  Then, I can perform a JNDI lookup on that
>> ConnectionFactory, and use it to actually get a connection to
>> my EIS.  With that said, will the RARDeployer still behave the same?
> 
> What change are you referring to? When you say JCA 1.0, do you mean the
> public final draft?
> 
>> I notice that when I perform a JNDI lookup on java:/BlackBoxDS what I get
>> back is
>> an instance of a com.sun.connector.blackbox.JdbcDataSource, I was expecting
>> to get back
>> some sort of ConnectionFactoryImpl.  Or do I get the ConnectionFactoryImpl
>> back after
>> I have deployed an EJB that references the ConnectionFactory?
> 
> You get back whatever object the resource adapter returns from
> ManagedConnection.getConnection(). This should compatible with the type
> you specified in your <res-type> tag, but I don't think this is enforced
> in JBoss (and you're not using the java:comp/env namespace anyway).

That does not sound as correct behaviour. The ConnectionFactory (its
implementation, ie JdbcDataSource - which is what you get in the exmple
abovem in the case of blackbox) should be bound to JNDI. Basically whats
bound in JNDI is what is returned from
ManagedConnectionFactory.createConnectionFactory()

Toby slipped in his answer, but has made a correct implementation.

The client looks up the factory and uses it to get a connection handle,
in the case of blackbox this means JdbcConnection.


> 
> What do you mean by "ConnectionFactoryImpl"?

He means JdbcDataSource, but has not understod that it is a
ConnectionFactory.


//Peter
> 
> Toby.
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]

-- 
Jobba hos oss: http://www.tim.se/weblab
------------------------------------------------------------
Peter Antman             Technology in Media, Box 34105 100 26 Stockholm
Systems Architect        WWW: http://www.tim.se
Email: [EMAIL PROTECTED]  WWW: http://www.backsource.org
Phone: +46-(0)8-506 381 11 Mobile: 070-675 3942 
------------------------------------------------------------



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to