[jboss-dev-forums] [Design of JCA on JBoss] - Re: Mbeans defined in a datasource descriptor should be star

adrian@jboss.org do-not-reply at jboss.com
Mon Nov 26 14:40:34 EST 2007


Guys, your completely off base. Don't raise bug reports based on
guesses and lack of knowledge, ask somebody who knows what is happening.

The bug report is just wrong, as is Anil's guess.

This question is also not an issue for the JCA Developers forum
it is a HELP request not a design topic.

Although I've left it here because of the discussion at the end my post.

ANSWER TO HELP REQUEST:

If you want to use a heuristic mbean dependency rather than a real one,
move the mbean configuration before the datasource.

JBoss deploys things in the order of the xml.

But this is still not a real dependency and will break if other dependencies cause the
ordering to change. e.g. if the MBean has other satisfied dependencies it will still
get deployed later.

REAL PROBLEM:

The real problem is that the JCA connection manager depends upon a jndi lookup
of the security domain, not an MBean.

The correct fix(es) would be to either:

1) Define it as a jndi dependency - which is possible in JBoss5, but its still a hack

2) Fix the dependency to be a real dependency - i.e. inject a SubjectFactory
into the JCA connection manager that really does depend upon the lifecycle
of the SecurityDomain.

This is not possible as far as I know using the current architecture of jboss-security.
Although we could implement an MC DependencyItem to make it possible
(like the way JNDI dependencies work).

A complication further being it will default to "other' when the domain doesn't exist
so in practice the dependency is technically always satisfied.

Solution (2) would also remove the bogus login modules from the JCA project
that should not be there. The real contract is give me a Subject, not do a
JAAS login (implementation detail).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107862#4107862

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107862



More information about the jboss-dev-forums mailing list