Message linking is now working.
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Thu, 13 Mar 2008 22:48:26 +0000 (22:48 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Thu, 13 Mar 2008 22:48:26 +0000 (22:48 +0000)
trunk/mythtv/monitor/src/main/java/org/wamblee/mythtv/Application.java
trunk/mythtv/timer/src/main/java/org/wamblee/timer/TimerBean.java
trunk/mythtv/timer/src/main/resources/META-INF/ejb-jar.xml
trunk/mythtv/timer/src/main/resources/META-INF/sun-ejb-jar.xml
trunk/mythtv/war/src/webapp/WEB-INF/sun-web.xml
trunk/mythtv/war/src/webapp/WEB-INF/web.xml

index bdf1cb03be6465a8a7400bce9a8c590f5e14c112..36ff3077ea31053f150f3aad50dbc054c5f61858 100644 (file)
@@ -62,6 +62,7 @@ public class Application implements ServletContextListener {
             msg.setObject(config.getIntervalSeconds());
             MessageProducer producer = session.createProducer(timerQueue);
             producer.send(msg);
+            LOG.info("Message sent");
         } catch (Exception e) {
             LOG.fatal("Error sending message", e);
         }
index ca9103017dc7dfa7a3c94ad63974123da2df3b02..7281bdbe5ebaca13e53b7655139d25d306a632f3 100644 (file)
@@ -39,7 +39,7 @@ import org.wamblee.io.DirectoryMonitor;
 /**
  * 
  */
-@MessageDriven(name = "MythtvTimer")
+@MessageDriven(name = "TimerBean")
 // Spring's JTA transaction manager does not work with container managed transactions
 // because it uses the UserTransaction object which glassfish forbids.
 @TransactionManagement(TransactionManagementType.BEAN)
@@ -67,7 +67,7 @@ public class TimerBean implements MessageListener {
   
     @Timeout
     private void timeout(Timer aTimer) {
-        LOG.debug("Timer expired!!!");
+        LOG.info("Timer expired!!!");
         try {
             DirectoryMonitor monitor = BeanKernel.getBeanFactory().find(
                     DirectoryMonitor.class);
index 84e66f9fce136a6b38a0630c118599a04238a6ca..09dda4ce45632e8c31cec76653bcd9f0081aa76d 100644 (file)
@@ -3,22 +3,19 @@
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
     http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
     version="3.0">
-    
-    <!-- enterprise-beans>
+
+    <enterprise-beans>
         <message-driven>
-           <ejb-name>TimerBean</ejb-name>
+            <ejb-name>TimerBean</ejb-name>
             <ejb-class>org.wamblee.timer.TimerBean</ejb-class>
-            <message-destination-ref>
-                <message-destination-ref-name>MythtvTimer</message-destination-ref-name>
-            </message-destination-ref>
+            <messaging-type>javax.jms.MessageListener</messaging-type>
+            <message-destination-type>javax.jms.Queue</message-destination-type>
+            <message-destination-link>InternalBootstrapQueue</message-destination-link>
         </message-driven>
-    </enterprise-beans -->
-    <!-- assembly-descriptor>
+    </enterprise-beans>
+    <assembly-descriptor>
         <message-destination>
-            
-            <message-destination-name>MythtvTimer</message-destination-name>
-            <mapped-name>jms/MythtvTimer</mapped-name>
+            <message-destination-name>InternalBootstrapQueue</message-destination-name>
         </message-destination>
-    </assembly-descriptor -->
-    
-</ejb-jar>
\ No newline at end of file
+    </assembly-descriptor>
+</ejb-jar>
index b08fa26ffe39369bc4531ddbad2f213aa4550764..b0f373b5c1aeca67b371fa6e831f7bf72442e922 100644 (file)
@@ -4,9 +4,14 @@
    
     <enterprise-beans>
         <ejb>
-            <ejb-name>MythtvTimer</ejb-name>
+            <ejb-name>TimerBean</ejb-name>
             <jndi-name>jms/MythtvTimer</jndi-name>
         </ejb>
+        <message-destination>
+            <message-destination-name>InternalBootstrapQueue</message-destination-name>
+            <jndi-name>jms/MythtvTimer</jndi-name>
+        </message-destination>
+      
     </enterprise-beans>
-   
+  
 </sun-ejb-jar>
\ No newline at end of file
index 606cf61ebdd34e5dbf1745b5ac235cc973a5199a..fc82b5d6827974ef2bb706d6e8719788565d3d6f 100644 (file)
@@ -9,11 +9,5 @@ Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.d
         <res-ref-name>MythtvConnectionFactory</res-ref-name>
         <jndi-name>jms/MythtvConnectionFactory</jndi-name>
     </resource-ref>
-    
-    
-    <message-destination-ref>
-        <message-destination-ref-name>MythtvTimer</message-destination-ref-name>
-        <jndi-name>jms/MythtvTimer</jndi-name>
-    </message-destination-ref>
-  
+
 </sun-web-app>
\ No newline at end of file
index 8d08eb7c19b79bc330ef9fddf7563baed54f2268..efd70d09de0ae0377d792edc1fb78c2e88374ec9 100644 (file)
         <persistence-context-ref-name>persistence/mythtv</persistence-context-ref-name>
     </persistence-context-ref>
     
-    <!-- resource-ref>
+    <resource-ref>
         <res-ref-name>MythtvConnectionFactory</res-ref-name>
         <res-type>javax.jms.ConnectionFactory</res-type>
         <res-auth>Container</res-auth>
         <res-sharing-scope>Shareable</res-sharing-scope>
-    </resource-ref -->
+    </resource-ref>
     
-    <!-- message-destination-ref>
-        <message-destination-ref-name>jms/MythtvTimer</message-destination-ref-name>
+    <message-destination-ref>
+        <message-destination-ref-name>MythtvTimer</message-destination-ref-name>
         <message-destination-type>javax.jms.Queue</message-destination-type>
         <message-destination-usage>Produces</message-destination-usage>
-        <message-destination-link>Timer</message-destination-link>
-    </message-destination-ref -->
+        <message-destination-link>InternalBootstrapQueue</message-destination-link>
+    </message-destination-ref>
    
 </web-app>