User: schaefera Date: 01/12/08 21:01:42 Modified: src/main/org/jboss/resource ConnectionFactoryLoader.java Log: Added Notification Transport to JSR-77 which works similar to EJB-Connector but with the tweak of JSR-77 interface. Added the adjusted JDBC JSR-77 shadow objects. Added JSR-77 to the Connector Factory enabling JSR-77 to start and stop Datasources. Added a testsuite for JSR-77 which tests the basic stuff inclusive the notification delivery. Revision Changes Path 1.17 +41 -3 jbosscx/src/main/org/jboss/resource/ConnectionFactoryLoader.java Index: ConnectionFactoryLoader.java =================================================================== RCS file: /cvsroot/jboss/jbosscx/src/main/org/jboss/resource/ConnectionFactoryLoader.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ConnectionFactoryLoader.java 2001/11/28 01:36:08 1.16 +++ ConnectionFactoryLoader.java 2001/12/09 05:01:42 1.17 @@ -49,6 +49,8 @@ import org.jboss.resource.security.PrincipalMapping; import org.jboss.system.ServiceMBeanSupport; +import org.jboss.management.j2ee.JDBCDataSource; + /** * Service that configures an instance of a deployed resource adapter and binds * the resulting connection factory into JNDI. <p> @@ -61,8 +63,9 @@ * * @author <a href="[EMAIL PROTECTED]">Toby Allsopp</a> * @author <a href="mailto:[EMAIL PROTECTED]">David Jencks</a> + * @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a> * @see RARDeployer - * @version $Revision: 1.16 $ <p> + * @version $Revision: 1.17 $ <p> * * <b>Revisions:</b> <p> * @@ -76,6 +79,10 @@ * <li> Fixed "property" file format loading that broke with move to * services.xml. * </ul> + * <b>20011207 Andreas Schaefer</b> + * <ul> + * <li> Added JSR-77 Support + * </ul> * */ public class ConnectionFactoryLoader @@ -371,8 +378,19 @@ super.postRegister(registrationDone); } - - + + public void preDeregister() + throws + Exception + { + super.preDeregister(); + + // Destroy JSR-77 EJB-Wrapper + JDBCDataSource.destroy( + getServer(), + jndiName + ); + } protected ObjectName getObjectName(MBeanServer server, ObjectName name) { @@ -409,6 +427,26 @@ } // end of if () loadConnectionFactory(); } + //AS ToDo: The check if the JDBCDataSource is already created has to be + //AS ToDO: removed when createService() is available + try { + java.util.Set lNames = getServer().queryNames( + new ObjectName( "*:type=JDBCDataSource,name=" + jndiName + ",*" ), + null + ); + if( lNames.iterator().hasNext() ) { + return; + } + } + catch( Exception e ) { + e.printStackTrace(); + } + // Create JSR-77 EJB-Wrapper + ObjectName lJDBCDataSource = JDBCDataSource.create( + getServer(), + jndiName, + getServiceName() + ); } protected void stopService()
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development