[jboss-cvs] JBossAS SVN: r104912 - in projects/snowdrop/examples/trunk/sportsclub: sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity and 7 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 18 02:55:33 EDT 2010
Author: marius.bogoevici
Date: 2010-05-18 02:55:32 -0400 (Tue, 18 May 2010)
New Revision: 104912
Added:
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentNotificationProcessor.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentTrigger.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessor.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessorImpl.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-messaging-context.xml
Removed:
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/service/
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/springmvc/PaymentController.java
Modified:
projects/snowdrop/examples/trunk/sportsclub/readme.txt
projects/snowdrop/examples/trunk/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/PaymentNotification.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/ws/PaymentNotificationService.java
projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-business-context.xml
Log:
build adjustments for EWP
Modified: projects/snowdrop/examples/trunk/sportsclub/readme.txt
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/readme.txt 2010-05-18 06:31:08 UTC (rev 104911)
+++ projects/snowdrop/examples/trunk/sportsclub/readme.txt 2010-05-18 06:55:32 UTC (rev 104912)
@@ -94,6 +94,15 @@
Steps 5,6 do not need to be executed in a particular order, but the database must be started
before the application is deployed.
+8. Special note: JMS integration can be enabled and disabled by commenting and respectively uncommenting
+the following line from sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-business-context.xml :
+<import resource="spring-messaging-context.xml"/>
+If the line is commented, then JMS integration will not be enabled. This feature allows to run Sportsclub using
+the JBoss AS Web Profile.
+
+
+
+
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/PaymentNotification.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/PaymentNotification.java 2010-05-18 06:31:08 UTC (rev 104911)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-domain/src/main/java/org/jboss/snowdrop/samples/sportsclub/domain/entity/PaymentNotification.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -29,4 +29,10 @@
{
this.amount = amount;
}
+
+ @Override
+ public String toString()
+ {
+ return "PaymentNotification[accountId=" + accountNumber + ", amount=" + amount + "]";
+ }
}
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java 2010-05-18 06:31:08 UTC (rev 104911)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/audit/PaymentAuditor.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -2,6 +2,8 @@
import java.math.BigDecimal;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.springframework.jmx.export.annotation.ManagedAttribute;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.stereotype.Component;
@@ -9,19 +11,23 @@
/**
* @author Marius Bogoevici
*/
- at ManagedResource(objectName = "sportsclub:name=paymentAuditor", description = "Payment Auditor", logFile = "log-sportsclub-auditor-jmx.log")
+ at ManagedResource(objectName = "sportsclub:name=paymentAuditor", description = "Payment Auditor")
@Component
public class PaymentAuditor
{
+
+ private static final Log LOG = LogFactory.getLog(PaymentAuditor.class);
+
private boolean enabled = true;
- @ManagedAttribute
+ @ManagedAttribute(description = "Audit enabled")
public void setEnabled(boolean enabled)
{
+ LOG.info("Audit " + (enabled ? "enabled":"disabled"));
this.enabled = enabled;
}
- @ManagedAttribute
+ @ManagedAttribute(description = "Audit enabled")
public boolean getEnabled()
{
return this.enabled;
@@ -31,11 +37,7 @@
{
if (this.enabled)
{
- System.out.println("AUDIT ENABLED! A payment has been made to account " + accountId + " for the amount of " + amount);
+ LOG.info("A payment has been made to account " + accountId + " for the amount of " + amount);
}
- else
- {
- System.out.println("AUDIT DISABLED!");
- }
}
}
Copied: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentNotificationProcessor.java (from rev 104566, projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/service/payment/PaymentNotificationProcessor.java)
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentNotificationProcessor.java (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentNotificationProcessor.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -0,0 +1,30 @@
+package org.jboss.snowdrop.samples.sportsclub.messaging;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.snowdrop.samples.sportsclub.payment.PaymentProcessor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.PaymentNotification;
+
+/**
+ * @author Marius Bogoevici
+ */
+ at Component
+public class PaymentNotificationProcessor
+{
+ private static final Log LOG = LogFactory.getLog(PaymentNotificationProcessor.class);
+
+ @Autowired
+ private PaymentProcessor paymentProcessor;
+
+ public void processPaymentNotification(PaymentNotification paymentNotification)
+ {
+ LOG.info(paymentNotification + " received");
+ paymentProcessor.processPayment(paymentNotification.getAccountNumber(), paymentNotification.getAmount());
+ LOG.info(paymentNotification + " processed");
+
+ }
+
+}
Added: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentTrigger.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentTrigger.java (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/messaging/PaymentTrigger.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -0,0 +1,39 @@
+package org.jboss.snowdrop.samples.sportsclub.messaging;
+
+import java.math.BigDecimal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.PaymentNotification;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.jms.core.JmsTemplate;
+import org.springframework.jmx.export.annotation.ManagedOperation;
+import org.springframework.jmx.export.annotation.ManagedOperationParameter;
+import org.springframework.jmx.export.annotation.ManagedResource;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author Marius Bogoevici
+ */
+ at ManagedResource(objectName = "sportsclub:name=paymentNotificationTrigger", description = "Payment Notification Trigger")
+ at Component
+public class PaymentTrigger
+{
+
+ private static final Log LOG = LogFactory.getLog(PaymentTrigger.class);
+
+ @Autowired
+ private JmsTemplate jmsTemplate;
+
+ @ManagedOperation(description = "Send Payment Notification")
+ public void sendPaymentNotification(
+ @ManagedOperationParameter(name="accountId", description= "The account for which the payment is made") Long accountId,
+ @ManagedOperationParameter(name="amount", description= "Payment amount") double amount)
+ {
+ PaymentNotification paymentNotification = new PaymentNotification();
+ paymentNotification.setAccountNumber(accountId);
+ paymentNotification.setAmount(BigDecimal.valueOf(amount));
+ jmsTemplate.convertAndSend(paymentNotification);
+ LOG.info(paymentNotification + " sent to message queue");
+ }
+}
Copied: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessor.java (from rev 104566, projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/service/payment/PaymentProcessor.java)
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessor.java (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessor.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -0,0 +1,14 @@
+package org.jboss.snowdrop.samples.sportsclub.payment;
+
+import java.math.BigDecimal;
+
+import org.springframework.transaction.annotation.Transactional;
+
+/**
+ * @author Marius Bogoevici
+ */
+public interface PaymentProcessor
+{
+ @Transactional
+ Long processPayment(Long accountId, BigDecimal amount);
+}
Copied: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessorImpl.java (from rev 104566, projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/service/payment/PaymentProcessorImpl.java)
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessorImpl.java (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/payment/PaymentProcessorImpl.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -0,0 +1,39 @@
+package org.jboss.snowdrop.samples.sportsclub.payment;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.Account;
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.Balance;
+import org.jboss.snowdrop.samples.sportsclub.domain.entity.Payment;
+import org.jboss.snowdrop.samples.sportsclub.domain.repository.AccountRepository;
+import org.jboss.snowdrop.samples.sportsclub.domain.repository.PaymentRepository;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+
+ at Component
+public class PaymentProcessorImpl implements PaymentProcessor
+{
+ @Autowired
+ private AccountRepository accountRepository;
+
+ @Autowired
+ private PaymentRepository paymentRepository;
+
+ @Transactional
+ public Long processPayment(Long accountId, BigDecimal amount)
+ {
+ Account account = accountRepository.findById(accountId);
+ Payment payment = new Payment();
+ payment.setAccount(account);
+
+ payment.setAmount(amount);
+ payment.setDate(new Date());
+ payment = paymentRepository.save(payment);
+ Balance balance = account.getBalance();
+ balance.credit(amount);
+ accountRepository.save(account);
+ return payment.getId();
+ }
+}
\ No newline at end of file
Deleted: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/springmvc/PaymentController.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/springmvc/PaymentController.java 2010-05-18 06:31:08 UTC (rev 104911)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/springmvc/PaymentController.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -1,44 +0,0 @@
-package org.jboss.snowdrop.samples.sportsclub.springmvc;
-
-import java.math.BigDecimal;
-
-import javax.ejb.EJB;
-
-import org.jboss.snowdrop.samples.sportsclub.domain.entity.Account;
-import org.jboss.snowdrop.samples.sportsclub.domain.entity.Invoice;
-import org.jboss.snowdrop.samples.sportsclub.domain.entity.PaymentNotification;
-import org.jboss.snowdrop.samples.sportsclub.ejb.SubscriptionService;
-import org.jboss.spring.samples.sportsclub.invoicing.services.BillingService;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.jms.core.JmsTemplate;
-import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.servlet.ModelAndView;
-
- at Controller
-public class PaymentController
-{
- @EJB(mappedName = "sportsclub/BillingService")
- BillingService billingService;
-
- @EJB(mappedName = "sportsclub/SubscriptionService")
- SubscriptionService subscriptionService;
-
- @Autowired
- private JmsTemplate jmsTemplate;
-
- @RequestMapping("/executePayment.do")
- ModelAndView doSomething(@RequestParam("accountId") Long accountId, @RequestParam("amount") double amount)
- {
- PaymentNotification paymentNotification = new PaymentNotification();
- paymentNotification.setAccountNumber(accountId);
- paymentNotification.setAmount(BigDecimal.valueOf(amount));
- jmsTemplate.convertAndSend(paymentNotification);
- ModelAndView modelAndView = new ModelAndView("paymentNotification");
- modelAndView.addObject("amount", amount);
- modelAndView.addObject("accountId", accountId);
- return modelAndView;
- }
-}
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/ws/PaymentNotificationService.java
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/ws/PaymentNotificationService.java 2010-05-18 06:31:08 UTC (rev 104911)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/java/org/jboss/snowdrop/samples/sportsclub/ws/PaymentNotificationService.java 2010-05-18 06:55:32 UTC (rev 104912)
@@ -4,11 +4,10 @@
import javax.jws.WebService;
import java.math.BigDecimal;
+import org.jboss.snowdrop.samples.sportsclub.payment.PaymentProcessor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
-import org.jboss.snowdrop.samples.sportsclub.service.payment.PaymentProcessor;
-
/**
* @author Marius Bogoevici
*/
Modified: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-business-context.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-business-context.xml 2010-05-18 06:31:08 UTC (rev 104911)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-business-context.xml 2010-05-18 06:55:32 UTC (rev 104912)
@@ -14,48 +14,14 @@
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
- <import resource="classpath*:dao-context.xml"/>
+ <context:component-scan base-package="org.jboss.snowdrop.samples.sportsclub.payment"/>
- <import resource="classpath*:infrastructure.xml"/>
+ <import resource="classpath*:dao-context.xml"/>
- <context:component-scan base-package="org.jboss.snowdrop.samples.sportsclub.service.payment"/>
+ <import resource="classpath*:infrastructure.xml"/>
- <jms:jca-listener-container resource-adapter="resourceAdapter" acknowledge="auto" activation-spec-factory="activationSpecFactory">
- <jms:listener destination="/queue/sportsclub" ref="paymentNotificationProcessor" method="processPaymentNotification"/>
- </jms:jca-listener-container>
-
- <bean id="activationSpecFactory" class="org.springframework.jms.listener.endpoint.DefaultJmsActivationSpecFactory">
- <property name="activationSpecClass" value="org.jboss.resource.adapter.jms.inflow.JmsActivationSpec"/>
- <property name="defaultProperties">
- <props>
- <prop key="clientId">remote</prop>
- <prop key="subscriptionName">jca-paymentProcessor</prop>
- <prop key="useDLQ">false</prop>
- </props>
- </property>
- </bean>
-
- <bean id="resourceAdapter" factory-bean="mBeanServer" factory-method="getAttribute">
- <constructor-arg>
- <bean class="org.springframework.jmx.support.ObjectNameManager" factory-method="getInstance">
- <constructor-arg value="jboss.jca:name='jms-ra.rar',service=RARDeployment"/>
- </bean>
- </constructor-arg>
- <constructor-arg value="ResourceAdapter"/>
- </bean>
-
<bean id="mBeanServer" class="org.jboss.mx.util.MBeanServerLocator" factory-method="locateJBoss"/>
- <jee:jndi-lookup id="jcaConnectionFactory" jndi-name="java:/JmsXA"/>
-
- <bean class="org.springframework.jms.core.JmsTemplate">
- <property name="connectionFactory" ref="jcaConnectionFactory"/>
- <property name="defaultDestinationName" value="queue/sportsclub"/>
- <property name="destinationResolver">
- <bean class="org.springframework.jms.support.destination.JndiDestinationResolver"/>
- </property>
- </bean>
-
<tx:annotation-driven/>
<aop:config>
@@ -84,5 +50,9 @@
</property>
<property name="server" ref="mBeanServer"/>
</bean>
-
+
+
+ <!-- Uncomment to enable JMS integration features -->
+ <!--<import resource="spring-messaging-context.xml"/>-->
+
</beans>
\ No newline at end of file
Added: projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-messaging-context.xml
===================================================================
--- projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-messaging-context.xml (rev 0)
+++ projects/snowdrop/examples/trunk/sportsclub/sportsclub-invoicing-webmvc/src/main/webapp/WEB-INF/spring-messaging-context.xml 2010-05-18 06:55:32 UTC (rev 104912)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:jee="http://www.springframework.org/schema/jee"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xmlns:jms="http://www.springframework.org/schema/jms"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms.xsd
+ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd
+ http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
+ http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
+
+ <context:component-scan base-package="org.jboss.snowdrop.samples.sportsclub.messaging"/>
+
+ <jms:jca-listener-container resource-adapter="resourceAdapter" acknowledge="auto"
+ activation-spec-factory="activationSpecFactory">
+ <jms:listener destination="/queue/sportsclub" ref="paymentNotificationProcessor"
+ method="processPaymentNotification"/>
+ </jms:jca-listener-container>
+
+ <bean id="activationSpecFactory" class="org.springframework.jms.listener.endpoint.DefaultJmsActivationSpecFactory">
+ <property name="activationSpecClass" value="org.jboss.resource.adapter.jms.inflow.JmsActivationSpec"/>
+ <property name="defaultProperties">
+ <props>
+ <prop key="clientId">remote</prop>
+ <prop key="subscriptionName">jca-paymentProcessor</prop>
+ <prop key="useDLQ">false</prop>
+ </props>
+ </property>
+ </bean>
+
+ <bean id="resourceAdapter" factory-bean="mBeanServer" factory-method="getAttribute">
+ <constructor-arg>
+ <bean class="org.springframework.jmx.support.ObjectNameManager" factory-method="getInstance">
+ <constructor-arg value="jboss.jca:name='jms-ra.rar',service=RARDeployment"/>
+ </bean>
+ </constructor-arg>
+ <constructor-arg value="ResourceAdapter"/>
+ </bean>
+
+ <jee:jndi-lookup id="jcaConnectionFactory" jndi-name="java:/JmsXA"/>
+
+ <bean class="org.springframework.jms.core.JmsTemplate">
+ <property name="connectionFactory" ref="jcaConnectionFactory"/>
+ <property name="defaultDestinationName" value="queue/sportsclub"/>
+ <property name="destinationResolver">
+ <bean class="org.springframework.jms.support.destination.JndiDestinationResolver"/>
+ </property>
+ </bean>
+
+</beans>
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list