Advertisement
Guest User

Untitled

a guest
Feb 9th, 2016
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.11 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <tomee>
  3.  
  4.  
  5. <Container id="My Singleton Container" type="SINGLETON">
  6. # Specifies the maximum time an invocation could wait for the
  7. # singleton bean instance to become available before giving up.
  8. #
  9. # After the timeout is reached a javax.ejb.ConcurrentAccessTimeoutException
  10. # will be thrown.
  11. #
  12. # Usable time units: nanoseconds, microsecons, milliseconds,
  13. # seconds, minutes, hours, days. Or any combination such as
  14. # "1 hour and 27 minutes and 10 seconds"
  15.  
  16. AccessTimeout = 30 seconds
  17.  
  18. </Container>
  19.  
  20.  
  21. <Container id="My Stateful Container" type="STATEFUL">
  22. # Specifies the maximum time an invocation could wait for the
  23. # stateful bean instance to become available before giving up.
  24. #
  25. # After the timeout is reached a javax.ejb.ConcurrentAccessTimeoutException
  26. # will be thrown.
  27. #
  28. # Usable time units: nanoseconds, microsecons, milliseconds,
  29. # seconds, minutes, hours, days. Or any combination such as
  30. # "1 hour and 27 minutes and 10 seconds"
  31.  
  32. AccessTimeout = 30 seconds
  33.  
  34. # The passivator is responsible for writing beans to disk
  35. # at passivation time. Different passivators can be used
  36. # by setting this property to the fully qualified class name
  37. # of the PassivationStrategy implementation. The passivator
  38. # is not responsible for invoking any callbacks or other
  39. # processing, its only responsibly is to write the bean state
  40. # to disk.
  41. #
  42. # Known implementations:
  43. # org.apache.openejb.core.stateful.RAFPassivater
  44. # org.apache.openejb.core.stateful.SimplePassivater
  45.  
  46. Passivator org.apache.openejb.core.stateful.SimplePassivater
  47.  
  48. # Specifies the time to wait between invocations. This
  49. # value is measured in minutes. A value of 5 would
  50. # result in a time-out of 5 minutes between invocations.
  51. # A value of zero would mean no timeout.
  52.  
  53. TimeOut 20
  54.  
  55. # Specifies the frequency (in seconds) at which the bean cache is checked for
  56. # idle beans.
  57.  
  58. Frequency 60
  59.  
  60. # Specifies the size of the bean pools for this
  61. # stateful SessionBean container.
  62.  
  63. Capacity 1000
  64.  
  65. # Property name that specifies the number of instances
  66. # to passivate at one time when doing bulk passivation.
  67. # Must be less than the PoolSize.
  68.  
  69. BulkPassivate 100
  70.  
  71. </Container>
  72.  
  73.  
  74. <Container id="My Stateless Container" type="STATELESS">
  75.  
  76. # Specifies the time an invokation should wait for an instance
  77. # of the pool to become available.
  78. #
  79. # After the timeout is reached, if an instance in the pool cannot
  80. # be obtained, the method invocation will fail.
  81. #
  82. # Usable time units: nanoseconds, microsecons, milliseconds,
  83. # seconds, minutes, hours, days. Or any combination such as
  84. # "1 hour and 27 minutes and 10 seconds"
  85.  
  86. AccessTimeout = 30 seconds
  87.  
  88. # Specifies the size of the bean pools for this stateless
  89. # SessionBean container. If StrictPooling is not used, instances
  90. # will still be created beyond this number if there is demand, but
  91. # they will not be returned to the pool and instead will be
  92. # immediately destroyed.
  93.  
  94. MaxSize = 10
  95.  
  96. # Specifies the minimum number of bean instances that should be in
  97. # the pool for each bean. Pools are prefilled to the minimum on
  98. # startup. Note this will create start order dependencies between
  99. # other beans that also eagerly start, such as other @Stateless
  100. # beans with a minimum or @Singleton beans using @Startup. The
  101. # @DependsOn annotation can be used to appropriately influence
  102. # start order.
  103. #
  104. # The minimum pool size is rigidly maintained. Instances in the
  105. # minimum side of the pool are not eligible for IdleTimeout or
  106. # GarbageCollection, but are subject to MaxAge and flushing.
  107. #
  108. # If the pool is flushed it is immediately refilled to the minimum
  109. # size with MaxAgeOffset applied. If an instance from the minimum
  110. # side of the pool reaches its MaxAge, it is also immediately
  111. # replaced. Replacement is done in a background queue using the
  112. # number of threads specified by CallbackThreads.
  113.  
  114. MinSize = 0
  115.  
  116. # StrictPooling tells the container what to do when the pool
  117. # reaches it's maximum size and there are incoming requests that
  118. # need instances.
  119. #
  120. # With strict pooling, requests will have to wait for instances to
  121. # become available. The pool size will never grow beyond the the
  122. # set MaxSize value. The maximum amount of time a request should
  123. # wait is specified via the AccessTimeout setting.
  124. #
  125. # Without strict pooling, the container will create temporary
  126. # instances to meet demand. The instances will last for just one
  127. # method invocation and then are removed.
  128. #
  129. # Setting StrictPooling to false and MaxSize to 0 will result in
  130. # no pooling. Instead instances will be created on demand and live
  131. # for exactly one method call before being removed.
  132.  
  133. StrictPooling = true
  134.  
  135. # Specifies the maximum time that an instance should live before
  136. # it should be retired and removed from use. This will happen
  137. # gracefully. Useful for situations where bean instances are
  138. # designed to hold potentially expensive resources such as memory
  139. # or file handles and need to be periodically cleared out.
  140. #
  141. # Usable time units: nanoseconds, microsecons, milliseconds,
  142. # seconds, minutes, hours, days. Or any combination such as
  143. # "1 hour and 27 minutes and 10 seconds"
  144.  
  145. MaxAge = 0 hours
  146.  
  147. # Specifies the maximum time that an instance should be allowed to
  148. # sit idly in the pool without use before it should be retired and
  149. # removed.
  150. #
  151. # Usable time units: nanoseconds, microsecons, milliseconds,
  152. # seconds, minutes, hours, days. Or any combination such as
  153. # "1 hour and 27 minutes and 10 seconds"
  154.  
  155. IdleTimeout = 0 minutes
  156.  
  157. </Container>
  158.  
  159. <Container id="My Message Container" type="MESSAGE">
  160.  
  161. # The resource adapter delivers messages to the container
  162. # Default value is Default JMS Resource Adapter.
  163.  
  164. ResourceAdapter = MyJmsResourceAdapter
  165.  
  166. # Specifies the message listener interface handled by this container
  167. # Default value is javax.jms.MessageListener.
  168.  
  169. MessageListenerInterface = javax.jms.MessageListener
  170.  
  171. # Specifies the activation spec class
  172. # Default value is org.apache.activemq.ra.ActiveMQActivationSpec.
  173.  
  174. ActivationSpecClass = org.apache.activemq.ra.ActiveMQActivationSpec
  175.  
  176. # Specifies the maximum number of bean instances that are allowed to
  177. # exist for each MDB deployment.
  178. # Default value is 10.
  179.  
  180. InstanceLimit = 10
  181.  
  182. </Container>
  183.  
  184. <Resource id="MyJmsResourceAdapter" type="ActiveMQResourceAdapter">
  185. BrokerXmlConfig = broker:(tcp://localhost:61616)?useJmx=false&amp;broker.persistent=false
  186. ServerUrl = tcp://localhost:61616
  187. DataSource = My Unmanaged DataSource
  188. </Resource>
  189.  
  190. <!--
  191. # For more examples of database configuration see:
  192. # http://openejb.apache.org/containers-and-resources.html
  193. -->
  194.  
  195. <Resource id="My Unmanaged DataSource" type="DataSource">
  196. JdbcDriver com.mysql.jdbc.Driver
  197. JdbcUrl jdbc:mysql://127.0.0.1:3306/test?autoReconnect=true
  198. UserName root
  199. Password root
  200. JtaManaged false
  201. </Resource>
  202.  
  203. <Resource id="My DataSource" type="DataSource">
  204. JdbcDriver com.mysql.jdbc.Driver
  205. JdbcUrl jdbc:mysql://127.0.0.1:3306/test?autoReconnect=true
  206. UserName root
  207. Password root
  208. JtaManaged true
  209. </Resource>
  210.  
  211. <Resource id="Mail" type="javax.mail.Session">
  212. mail.smtp.host=smtp.gmail.com
  213. mail.smtp.port=587
  214. mail.transport.protocol=smtp
  215. mail.smtp.auth=true
  216. mail.smtp.starttls.enable=true
  217. mail.smtp.user=mejlmejl888@gmail.com
  218. password=lubenica50
  219. </Resource>
  220.  
  221. <Resource id="JmsConnectionFactory" type="javax.jms.ConnectionFactory">
  222. ResourceAdapter = MyJmsResourceAdapter
  223. </Resource>
  224.  
  225. <Resource id="PaymentQueue" type="javax.jms.Queue">
  226. destination=PaymentQueue
  227. </Resource>
  228.  
  229. <!--
  230. #
  231. # The <Deployments> element can be used to configure file
  232. # paths where OpenEJB should look for ejb jars or ear files.
  233. #
  234. # See http://openejb.apache.org/3.0/deployments.html
  235. #
  236. # The below entry is simply a default and can be changed or deleted
  237. -->
  238. <Deployments dir="apps/" />
  239.  
  240. </tomee>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement