diff options
Diffstat (limited to 'qpid/java/jca/example/conf')
| -rw-r--r-- | qpid/java/jca/example/conf/application.xml | 37 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/ejb-jar.xml | 67 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/geronimo-application.xml | 151 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/geronimo-ra.xml | 138 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/jboss-web.xml | 34 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/jboss.xml | 80 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/log4j.properties | 18 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/qpid-jca-ds.xml | 123 | ||||
| -rw-r--r-- | qpid/java/jca/example/conf/web.xml | 52 |
9 files changed, 700 insertions, 0 deletions
diff --git a/qpid/java/jca/example/conf/application.xml b/qpid/java/jca/example/conf/application.xml new file mode 100644 index 0000000000..d181bcda67 --- /dev/null +++ b/qpid/java/jca/example/conf/application.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd"> + + <module> + <ejb>@ejb.name@</ejb> + </module> + + <module> + <web> + <web-uri>@war.name@</web-uri> + <context-root>/qpid-jca-web</context-root> + </web> + </module> + +</application> + diff --git a/qpid/java/jca/example/conf/ejb-jar.xml b/qpid/java/jca/example/conf/ejb-jar.xml new file mode 100644 index 0000000000..2f513bd3f8 --- /dev/null +++ b/qpid/java/jca/example/conf/ejb-jar.xml @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" version="3.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee + http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"> + + <enterprise-beans> + <message-driven> + <ejb-name>QpidHelloListenerBean</ejb-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.jms.ConnectionFactory</res-type> + <res-auth>Container</res-auth> + <res-sharing-scope>Shareable</res-sharing-scope> + </resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidHelloSubscriberBean</ejb-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.jms.ConnectionFactory</res-type> + <res-auth>Container</res-auth> + <res-sharing-scope>Shareable</res-sharing-scope> + </resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidJMSResponderBean</ejb-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.jms.ConnectionFactory</res-type> + <res-auth>Container</res-auth> + <res-sharing-scope>Shareable</res-sharing-scope> + </resource-ref> + </message-driven> + <session> + <ejb-name>QpidTestBean</ejb-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.jms.ConnectionFactory</res-type> + <res-auth>Container</res-auth> + <res-sharing-scope>Shareable</res-sharing-scope> + </resource-ref> + </session> + </enterprise-beans> + + +</ejb-jar> diff --git a/qpid/java/jca/example/conf/geronimo-application.xml b/qpid/java/jca/example/conf/geronimo-application.xml new file mode 100644 index 0000000000..832496e76f --- /dev/null +++ b/qpid/java/jca/example/conf/geronimo-application.xml @@ -0,0 +1,151 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<application xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-2.0" + xmlns:sys="http://geronimo.apache.org/xml/ns/deployment-1.2" + xmlns:naming="http://geronimo.apache.org/xml/ns/naming-1.2" + application-name="QpidJCAExampleApplication"> + + <sys:environment> + <sys:moduleId> + <sys:groupId>@geronimo.ear.group.id@</sys:groupId> + <sys:artifactId>@geronimo.ear.artifact.id@</sys:artifactId> + <sys:version>@geronimo.ear.version@</sys:version> + <sys:type>@geronimo.ear.type@</sys:type> + </sys:moduleId> + </sys:environment> + + <!-- Plan for embedded WAR --> + <module> + <web>qpid-jcaex-web.war</web> + <web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"> + + <sys:environment> + <sys:moduleId> + <sys:groupId>@geronimo.war.group.id@</sys:groupId> + <sys:artifactId>@geronimo.war.artifact.id@</sys:artifactId> + <sys:version>@geronimo.war.version@</sys:version> + <sys:type>@geronimo.war.type@</sys:type> + </sys:moduleId> + + <sys:dependencies> + <sys:dependency> + <sys:groupId>qpid.jca</sys:groupId> + <sys:artifactId>QpidJCAAdapter</sys:artifactId> + <sys:version>1.0</sys:version> + <sys:type>rar</sys:type> + </sys:dependency> + </sys:dependencies> + </sys:environment> + + <context-root>/qpid-jca-web</context-root> + + <naming:ejb-local-ref> + <naming:ref-name>QpidTestBean</naming:ref-name> + <naming:ejb-link>QpidTestBean</naming:ejb-link> + </naming:ejb-local-ref> + + <naming:resource-ref> + <naming:ref-name>QpidJMSXA</naming:ref-name> + <naming:resource-link>QpidJMSXA</naming:resource-link> + </naming:resource-ref> + </web-app> + </module> + + <!-- Plan for embedded EJBs --> + <module> + <ejb>qpid-jcaex-ejb.jar</ejb> + <openejb-jar xmlns="http://www.openejb.org/xml/ns/openejb-jar-2.1"> + + <sys:environment> + <sys:moduleId> + <sys:groupId>@geronimo.ejb.group.id@</sys:groupId> + <sys:artifactId>@geronimo.ejb.artifact.id@</sys:artifactId> + <sys:version>@geronimo.ejb.version@</sys:version> + <sys:type>@geronimo.ejb.type@</sys:type> + </sys:moduleId> + + <sys:dependencies> + <sys:dependency> + <sys:groupId>qpid.jca</sys:groupId> + <sys:artifactId>QpidJCAAdapter</sys:artifactId> + <sys:version>1.0</sys:version> + <sys:type>rar</sys:type> + </sys:dependency> + </sys:dependencies> + <sys:hidden-classes/> + <sys:non-overridable-classes/> + </sys:environment> + + <enterprise-beans> + <message-driven> + <ejb-name>QpidHelloListenerBean</ejb-name> + <resource-adapter> + <resource-link>QpidResourceAdapter</resource-link> + </resource-adapter> + <naming:resource-ref> + <naming:ref-name>QpidJMSXA</naming:ref-name> + <naming:resource-link>QpidJMSXA</naming:resource-link> + </naming:resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidGoodByeListenerBean</ejb-name> + <resource-adapter> + <resource-link>QpidResourceAdapter</resource-link> + </resource-adapter> + </message-driven> + <message-driven> + <ejb-name>QpidHelloSubscriberBean</ejb-name> + <resource-adapter> + <resource-link>QpidResourceAdapter</resource-link> + </resource-adapter> + <naming:resource-ref> + <naming:ref-name>QpidJMSXA</naming:ref-name> + <naming:resource-link>QpidJMSXA</naming:resource-link> + </naming:resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidGoodByeSubscriberBean</ejb-name> + <resource-adapter> + <resource-link>QpidResourceAdapter</resource-link> + </resource-adapter> + </message-driven> + <message-driven> + <ejb-name>QpidJMSResponderBean</ejb-name> + <resource-adapter> + <resource-link>QpidResourceAdapter</resource-link> + </resource-adapter> + <naming:resource-ref> + <naming:ref-name>QpidJMSXA</naming:ref-name> + <naming:resource-link>QpidJMSXA</naming:resource-link> + </naming:resource-ref> + </message-driven> + <session> + <ejb-name>QpidTestBean</ejb-name> + <naming:resource-ref> + <naming:ref-name>QpidJMSXA</naming:ref-name> + <naming:resource-link>QpidJMSXA</naming:resource-link> + </naming:resource-ref> + </session> + </enterprise-beans> + </openejb-jar> + </module> +</application> diff --git a/qpid/java/jca/example/conf/geronimo-ra.xml b/qpid/java/jca/example/conf/geronimo-ra.xml new file mode 100644 index 0000000000..2943ac0a58 --- /dev/null +++ b/qpid/java/jca/example/conf/geronimo-ra.xml @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<connector xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"> + <dep:environment xmlns:dep="http://geronimo.apache.org/xml/ns/deployment-1.2"> + <dep:moduleId> + <dep:groupId>qpid.jca</dep:groupId> + <dep:artifactId>QpidJCAAdapter</dep:artifactId> + <dep:version>1.0</dep:version> + <dep:type>rar</dep:type> + </dep:moduleId> + </dep:environment> + <resourceadapter> + <resourceadapter-instance> + <resourceadapter-name>QpidResourceAdapter</resourceadapter-name> + <config-property-setting name="ClientId">client_id</config-property-setting> + <config-property-setting name="TransactionManagerLocatorClass">org.apache.qpid.ra.tm.GeronimoTransactionManagerLocator</config-property-setting> + <config-property-setting name="TransactionManagerLocatorMethod">getTransactionManager</config-property-setting> + <!-- Note, currently there is a bug with end/suspend and Geronimo. For now use local transactions--> + <config-property-setting name="UseLocalTx">true</config-property-setting> + <workmanager> + <gbean-link>DefaultWorkManager</gbean-link> + </workmanager> + </resourceadapter-instance> + <outbound-resourceadapter> + <connection-definition> + <connectionfactory-interface>org.apache.qpid.ra.QpidRAConnectionFactory</connectionfactory-interface> + <connectiondefinition-instance> + <name>QpidJMSXA</name> + <implemented-interface>javax.jms.QueueConnectionFactory</implemented-interface> + <implemented-interface>javax.jms.TopicConnectionFactory</implemented-interface> + <config-property-setting name="ConnectionURL">@broker.url@</config-property-setting> + <connectionmanager> + <!-- Note, currently there is a bug with end/suspend and Geronimo. For now use no transactions outbound --> + <no-transaction/> + <single-pool> + <max-size>20</max-size> + <min-size>0</min-size> + <match-one/> + </single-pool> + </connectionmanager> + </connectiondefinition-instance> + </connection-definition> + </outbound-resourceadapter> + <!-- Note, do not remove this admin object. There appears to be a bug in Geronimo's deployer that does not correctly create JNDI references + if an extra admin object is not present --> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>Dummy</message-destination-name> + <config-property-setting name="destinationType">TOPIC</config-property-setting> + <config-property-setting name="destinationAddress">amq.topic</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>HelloTopic</message-destination-name> + <config-property-setting name="destinationType">TOPIC</config-property-setting> + <config-property-setting name="destinationAddress">@qpid.hello.topic.dest.address@</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>GoodByeTopic</message-destination-name> + <config-property-setting name="destinationType">TOPIC</config-property-setting> + <config-property-setting name="destinationAddress">@qpid.goodbye.topic.dest.address@</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>HelloGoodByeTopic</message-destination-name> + <config-property-setting name="destinationType">TOPIC</config-property-setting> + <config-property-setting name="destinationAddress">@qpid.hellogoodbye.topic.dest.address@</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>HelloQueue</message-destination-name> + <config-property-setting name="destinationType">QUEUE</config-property-setting> + <config-property-setting name="destinationAddress">@qpid.hello.queue.dest.address@</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>GoodByeQueue</message-destination-name> + <config-property-setting name="destinationType">QUEUE</config-property-setting> + <config-property-setting name="destinationAddress">@qpid.goodbye.queue.dest.address@</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.Destination</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidDestinationProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>ResponderQueue</message-destination-name> + <config-property-setting name="destinationType">QUEUE</config-property-setting> + <config-property-setting name="destinationAddress">@qpid.responder.queue.dest.address@</config-property-setting> + </adminobject-instance> + </adminobject> + <adminobject> + <adminobject-interface>javax.jms.ConnectionFactory</adminobject-interface> + <adminobject-class>org.apache.qpid.ra.admin.QpidConnectionFactoryProxy</adminobject-class> + <adminobject-instance> + <message-destination-name>QpidConnectionFactory</message-destination-name> + <config-property-setting name="connectionURL">@broker.url@</config-property-setting> + </adminobject-instance> + </adminobject> + </resourceadapter> +</connector> + diff --git a/qpid/java/jca/example/conf/jboss-web.xml b/qpid/java/jca/example/conf/jboss-web.xml new file mode 100644 index 0000000000..edacf8d418 --- /dev/null +++ b/qpid/java/jca/example/conf/jboss-web.xml @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<jboss-web> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.jms.ConnectionFactory</res-type> + <jndi-name>java:/QpidJMSXA</jndi-name> + </resource-ref> + <ejb-local-ref> + <ejb-ref-name>QpidTestBean</ejb-ref-name> + <jndi-name>qpid-jcaex/QpidTestBean/local</jndi-name> + </ejb-local-ref> + <context-root>qpid-jca-web</context-root> +</jboss-web> + diff --git a/qpid/java/jca/example/conf/jboss.xml b/qpid/java/jca/example/conf/jboss.xml new file mode 100644 index 0000000000..8b62ca73b0 --- /dev/null +++ b/qpid/java/jca/example/conf/jboss.xml @@ -0,0 +1,80 @@ +<?xml version="1.0"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<jboss + xmlns="http://www.jboss.com/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee + http://www.jboss.org/j2ee/schema/jboss_5_0.xsd" + version="3.0"> + + <enterprise-beans> + <message-driven> + <ejb-name>QpidHelloListenerBean</ejb-name> + <resource-adapter-name>@rar.name@</resource-adapter-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <jndi-name>java:/QpidJMSXA</jndi-name> + </resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidGoodByeListenerBean</ejb-name> + <resource-adapter-name>@rar.name@</resource-adapter-name> + </message-driven> + <message-driven> + <ejb-name>QpidHelloSubscriberBean</ejb-name> + <resource-adapter-name>@rar.name@</resource-adapter-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <jndi-name>java:/QpidJMSXA</jndi-name> + </resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidGoodByeSubscriberBean</ejb-name> + <resource-adapter-name>@rar.name@</resource-adapter-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <jndi-name>java:/QpidJMSXA</jndi-name> + </resource-ref> + </message-driven> + <message-driven> + <ejb-name>QpidJMSResponderBean</ejb-name> + <resource-adapter-name>@rar.name@</resource-adapter-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <jndi-name>java:/QpidJMSXA</jndi-name> + </resource-ref> + </message-driven> + <session> + <ejb-name>QpidTestBean</ejb-name> + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.sql.DataSource</res-type> + <jndi-name>java:/QpidJMSXA</jndi-name> + </resource-ref> + </session> + </enterprise-beans> + +</jboss> diff --git a/qpid/java/jca/example/conf/log4j.properties b/qpid/java/jca/example/conf/log4j.properties new file mode 100644 index 0000000000..f1847f4418 --- /dev/null +++ b/qpid/java/jca/example/conf/log4j.properties @@ -0,0 +1,18 @@ +log4j.rootLogger=DEBUG, CONSOLE, FILE + +#Console Appender +log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender +log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout +log4j.appender.CONSOLE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n + +#File Appender +log4j.appender.FILE=org.apache.log4j.FileAppender +log4j.appender.FILE.File=./build/log/qpid-jca-example.log +log4j.appender.FILE.layout=org.apache.log4j.PatternLayout +log4j.appender.FILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n + +log4j.logger.org.jboss=WARN +log4j.logger.org.jnp.interfaces=WARN +log4j.logger.org.apache.qpid=ERROR +log4j.logger.org.apache.qpid.jca.example=DEBUG + diff --git a/qpid/java/jca/example/conf/qpid-jca-ds.xml b/qpid/java/jca/example/conf/qpid-jca-ds.xml new file mode 100644 index 0000000000..9e589169e3 --- /dev/null +++ b/qpid/java/jca/example/conf/qpid-jca-ds.xml @@ -0,0 +1,123 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<connection-factories> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=HelloTopic"> + <attribute name="JNDIName">HelloTopic</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.Destination</attribute> + <attribute name="Properties"> + destinationType=TOPIC + destinationAddress=@qpid.hello.topic.dest.address@ + </attribute> + </mbean> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=GoodByeTopic"> + <attribute name="JNDIName">GoodByeTopic</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.Destination</attribute> + <attribute name="Properties"> + destinationType=TOPIC + destinationAddress=@qpid.goodbye.topic.dest.address@ + </attribute> + </mbean> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=HelloGoodByeTopic"> + <attribute name="JNDIName">HelloGoodByeTopic</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.Destination</attribute> + <attribute name="Properties"> + destinationType=TOPIC + destinationAddress=@qpid.hellogoodbye.topic.dest.address@ + </attribute> + </mbean> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=HelloQueue"> + <attribute name="JNDIName">HelloQueue</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.Destination</attribute> + <attribute name="Properties"> + destinationType=QUEUE + destinationAddress=@qpid.hello.queue.dest.address@ + </attribute> + </mbean> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=GoodByeQueue"> + <attribute name="JNDIName">GoodByeQueue</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.Destination</attribute> + <attribute name="Properties"> + destinationType=QUEUE + destinationAddress=@qpid.goodbye.queue.dest.address@ + </attribute> + </mbean> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=QpidResponderQueue"> + <attribute name="JNDIName">QpidResponderQueue</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.Destination</attribute> + <attribute name="Properties"> + destinationType=QUEUE + destinationAddress=@qpid.responder.queue.dest.address@ + </attribute> + </mbean> + + <mbean code="org.jboss.resource.deployment.AdminObject" + name="qpid.jca:name=QpidConnectionFactory"> + <attribute name="JNDIName">QpidConnectionFactory</attribute> + <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='@rar.name@'</depends> + <attribute name="Type">javax.jms.ConnectionFactory</attribute> + <attribute name="Properties"> + connectionURL=@broker.url@ + </attribute> + </mbean> + + <!-- Non XA connection factory. Can be used when running adapter against clustered Brokers --> + <tx-connection-factory> + <jndi-name>QpidJMS</jndi-name> + <rar-name>@rar.name@</rar-name> + <local-transaction/> + <config-property name="useLocalTx" type="java.lang.Boolean">true</config-property> + <config-property name="connectionURL">@broker.url@</config-property> + <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property> + <connection-definition>org.apache.qpid.ra.QpidRAConnectionFactory</connection-definition> + <max-pool-size>20</max-pool-size> + </tx-connection-factory> + + <!--XA ConnectionFactory--> + <tx-connection-factory> + <jndi-name>QpidJMSXA</jndi-name> + <xa-transaction/> + <rar-name>@rar.name@</rar-name> + <config-property name="connectionURL">@broker.url@</config-property> + <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Queue</config-property> + <connection-definition>org.apache.qpid.ra.QpidRAConnectionFactory</connection-definition> + <max-pool-size>20</max-pool-size> + </tx-connection-factory> + +</connection-factories> diff --git a/qpid/java/jca/example/conf/web.xml b/qpid/java/jca/example/conf/web.xml new file mode 100644 index 0000000000..509612dc90 --- /dev/null +++ b/qpid/java/jca/example/conf/web.xml @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + - + - Licensed to the Apache Software Foundation (ASF) under one + - or more contributor license agreements. See the NOTICE file + - distributed with this work for additional information + - regarding copyright ownership. The ASF licenses this file + - to you under the Apache License, Version 2.0 (the + - "License"); you may not use this file except in compliance + - with the License. You may obtain a copy of the License at + - + - http://www.apache.org/licenses/LICENSE-2.0 + - + - Unless required by applicable law or agreed to in writing, + - software distributed under the License is distributed on an + - "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + - KIND, either express or implied. See the License for the + - specific language governing permissions and limitations + - under the License. + - + --> +<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> + + <resource-ref> + <res-ref-name>QpidJMSXA</res-ref-name> + <res-type>javax.jms.ConnectionFactory</res-type> + <res-auth>Container</res-auth> + <res-sharing-scope>Shareable</res-sharing-scope> + </resource-ref> + + <ejb-local-ref> + <ejb-ref-name>QpidTestBean</ejb-ref-name> + <ejb-ref-type>Session</ejb-ref-type> + <local>org.apache.qpid.jca.example.ejb.QpidTestLocal</local> + </ejb-local-ref> + + <servlet> + <display-name>QpidTestServlet</display-name> + <servlet-name>QpidTestServlet</servlet-name> + <servlet-class>org.apache.qpid.jca.example.web.QpidTestServlet</servlet-class> + <load-on-startup>1</load-on-startup> + </servlet> + + <servlet-mapping> + <servlet-name>QpidTestServlet</servlet-name> + <url-pattern>/qpid</url-pattern> + </servlet-mapping> + + +</web-app> + |
