JBoss development,
A new message was posted in the thread "Standalone JCA: JNDI binding for multiple
connection factories...":
http://community.jboss.org/message/528621#528621
Author : Scott Marlow
Profile :
http://community.jboss.org/people/smarlow@redhat.com
Message:
--------------------------------------------------------------
It is a requirement that a CF implements the
javax.resource.Referenceable and java.io.Serializable - so that will
always be the case. Hence the current instanceof check.
Dealing
with resource adapters that doesn't implement this requirement could be
something we could look at down the road - but ideally people should
fix their code. That is why we have the validator.
The 1.6 Final Draft November 2009 argues with itself over this:
"20.6.1 Responsibilities In both managed and non-managed environments, registration
of a connection factory instance in the JNDI namespace must use either the JNDI Reference
or Serializable mechanism. ... "
"6.5.1.3 Additional Requirements ... A connection factory implementation class must
implement the interface javax.resource.Referenceable. ... "
An idea could be to create a unique name for each CF, and then
create an alias for the unique name that the user will use. That would
allow us to move the primary names in the JNDI without having to change
any user code. I thinking of java:/eis/, java:global, and other
scenarios depending where the JCA container is deployed.
The
key is to make it simple for users - a JNDI name should be optional,
and in that case we would create an alias based on our default
strategy, f.ex. java:/eis/resourceadapter as we have now.
Also
we should consider how the deployment of the same resource adapter
multiple times - under different names should work. Making the resource
adapter archive name part of the unique name could be an idea - we can
always use the metadata repository to search for information.
+1 for not having to change any user code due to how we manage the CF jndi binding
I'm not sure about the unique name part though.
What is the alias? Do you mean generically or with something like a LinkRef (I've
never used that before so not sure how it works yet).
--------------------------------------------------------------
To reply to this message visit the message page:
http://community.jboss.org/message/528621#528621