On Wed, 2006-02-01 at 11:57, Bill Burke wrote: > In EJB3 I'm trying to guess the datasource MBean name so that I can > create a dependency on it. I do this based on the JNDI name passed into > persistence.xml. So, if the datsource is "java:/DefaultDS" I assume > that there is a: > > "jboss.jca:service=DataSource,name=DefaultDS" mbean available. > > Is this a valid assumption? >
There are degrees of valid assumption. :-) If it is deployed as an xxx-datasource in a -ds.xml then yes. See the stylesheet that creates the MBean config. If it is deployed as an xxx-connection-factory then no. http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigJCALoginModule shows the difference in the names and there is obviously no DataSourceBinding. e.g. at least firebird has its own rar that is deployed this way. Don't blame me for the different names, this is legacy rubbish that dates back to 2.4.x They should really all be just: jboss.jca:service=ConnectionManager,name={jndiName} If somebody doesn't use a -ds.xml (not recommended, but it is the only way to use your own pool implementation) then who knows what they called the MBean?... > Thanks, > > Bill -- xxxxxxxxxxxxxxxxxxxxxxxx Adrian Brock Chief Scientist JBoss Inc. xxxxxxxxxxxxxxxxxxxxxxxx ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development