java - How to add @Ressource from TomEE to Jboss -


im trying migrate application tomee jboss.

i found injection of ressource :

@resource(name = "saraconnectionfactory") private connectionfactory saraconnectionfactory;  @resource(name = "saratoolsqueue") private queue saraqueue;  @resource(name = "saratargetservice") private string service;  @resource(name = "saratimeout") private long timeout; 

the statement in tomee.xml :

    <resource id="sarajmsresourceadapter" type="activemqresourceadapter">     <!--brokerxmlconfig -->     serverurl tcp://bdv06:61616      </resource>      <resource id="saratoolsqueue" type="javax.jms.queue">     destination rmw     </resource>      <connector id="saraconnectionfactory"type="javax.jms.connectionfactory">     resourceadapter sarajmsresourceadapter      # specifies if connection enrolled in global transaction     transactionsupport none      # maximum number of physical connection activemq broker     poolmaxsize 10      # minimum number of physical connection activemq broker     poolminsize 0      # maximum amount of time wait connection     connectionmaxwaitmilliseconds 10000      # maximum amount of time connection can idle before being reclaimed     connectionmaxidleminutes 15     </connector> 

how can translate these tag standalone.xml ( jboss).

thxs.

i tried way simulate activemq jboss.

<subsystem xmlns="urn:jboss:domain:resource-adapters:1.1">         <resource-adapters>             <resource-adapter id="resourceadapterforsara">                 <module slot="main" id="org.apache.activemq"/>                 <transaction-support>xatransaction</transaction-support>                 <config-property name="serverurl">                     tcp://cdjactivemq:3030                 </config-property>                 <connection-definitions>                     <connection-definition class-name="org.apache.activemq.ra.activemqmanagedconnectionfactory" jndi-name="java:jboss/connectionfactoryforsara" enabled="true" use-java-context="true" pool-name="connectionfactoryforsara">                         <xa-pool>                             <min-pool-size>1</min-pool-size>                             <max-pool-size>20</max-pool-size>                         </xa-pool>                         <recovery>                             <recover-credential>                                 <user-name>admin</user-name>                                 <password>admin</password>                             </recover-credential>                         </recovery>                     </connection-definition>                 </connection-definitions>             </resource-adapter>         </resource-adapters>     </subsystem> 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -