<?xml version="1.0" encoding="UTF-8"?>
<openejb>

<Container id="My CMP Container" type="CMP_ENTITY">
  # This container can service CMP 1.1 and 2.x Entity Beans
  #
  # Persistence is achived by taking the entity beans deployed
  # and internally readapting them to the new EJB 3.0 JPA (Java
  # Persistence API) specification.  It is possible, though
  # not well documented, to mix in newer JPA concepts with
  # old style Entity beans allowing you to slowly transition
  # your entities to JPA.  Aggressively inquiring on the
  # users@openejb.apache.org about this feature will help
  # us generate better documentation.
  # ---------

</Container>


<Container id="My BMP Container" type="BMP_ENTITY">

  # Specifies the size of the bean pools for this
  # bmp entity container.

  PoolSize 10

</Container>


<Container id="My Stateful Container" type="STATEFUL">
  #  The passivator is responsible for writing beans to disk
  #  at passivation time. Different passivators can be used
  #  by setting this property to the fully qualified class name
  #  of the PassivationStrategy implementation. The passivator
  #  is not responsible for invoking any callbacks or other
  #  processing, its only responsibly is to write the bean state
  #  to disk.
  #
  #  Known implementations:
  #     org.apache.openejb.core.stateful.RAFPassivater
  #     org.apache.openejb.core.stateful.SimplePassivater

  Passivator   org.apache.openejb.core.stateful.SimplePassivater

  #  Specifies the time to wait between invocations. This
  #  value is measured in minutes. A value of 5 would
  #  result in a time-out of 5 minutes between invocations.
  #  A value of zero would mean no timeout.

  TimeOut  20

  #  Specifies the size of the bean pools for this
  #  stateful SessionBean container.

  Capacity  1000

  #  Property name that specifies the number of instances
  #  to passivate at one time when doing bulk passivation.
  #  Must be less than the PoolSize.

  BulkPassivate  100

</Container>

<Container id="My Stateless Container" type="STATELESS">
  #  Specifies the time to wait between invocations. This
  #  value is measured in milliseconds.  A value of 5 would
  #  result in a time-out of 5 milliseconds between invocations.
  #  A value of zero would mean no timeout.

  TimeOut  0

  #  Specifies the size of the bean pools for this
  #  stateless SessionBean container.

  PoolSize  1

  #  StrictPooling tells the container what to do when the pool
  #  reaches it's maximum size and there are incoming requests
  #  that need instances.
  #
  #  With strict pooling, requests will have to wait for instances
  #  to become available.  The pool size will never grow beyond the
  #  the set PoolSize value.
  #
  #  Without strict pooling, the container will create temporary
  #  instances to meet demand.  The instances will last for just one
  #  method invocation and then are removed.

  StrictPooling  true

</Container>


<Container id="My MDB Container " type="MESSAGE">

  #  The resource adapter delivers messages to the container

  ResourceAdapter My JMS Resource Adapter

  # Specifies the message listener interface handled by this container

  MessageListenerInterface javax.jms.MessageListener

  # Specifies the activation spec class

  ActivationSpecClass org.apache.activemq.ra.ActiveMQActivationSpec

  # Specifies the maximum number of bean instances that are
  # allowed to exist for each MDB deployment.

  InstanceLimit 10

</Container>


<!--
# For more examples of database configuration see:
# http://openejb.apache.org/3.0/databases.html
-->

<Resource id="My DataSource" type="DataSource">
  JdbcDriver org.hsqldb.jdbcDriver
  JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
  UserName sa
  Password
  JtaManaged true
</Resource>


<Resource id="My Unmanaged DataSource" type="DataSource">
  JdbcDriver org.hsqldb.jdbcDriver
  JdbcUrl jdbc:hsqldb:file:data/hsqldb/hsqldb
  UserName sa
  Password
  JtaManaged false
</Resource>


<Resource id="My JMS Resource Adapter" type="ActiveMQResourceAdapter">
  # Broker configuration URI as defined by ActiveMQ
  # see http://activemq.apache.org/broker-configuration-uri.html

  BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false

  # Broker address

  ServerUrl vm://localhost?async=true

  # DataSource for persistence messages

  DataSource My Unmanaged DataSource
</Resource>


<Connector id="My JMS Connection Factory" type="javax.jms.ConnectionFactory">

  ResourceAdapter My JMS Resource Adapter

  # Specifies if the connection is enrolled in global transaction
  # allowed values: xa, local or none

  TransactionSupport xa

  # Maximum number of physical connection to the ActiveMQ broker

  PoolMaxSize 10

  # Minimum number of physical connection to the ActiveMQ broker

  PoolMinSize 0

  # Maximum amount of time to wait for a connection

  ConnectionMaxWaitMilliseconds 5000

  # Maximum amount of time a connection can be idle before being reclaimed

  ConnectionMaxIdleMinutes 15

</Connector>

<!--
#
#  The <Deployments> element can be used to configure file
#  paths where OpenEJB should look for ejb jars or ear files.
#
#  See http://openejb.apache.org/deployments.html
#
#  The below entry is simply a default and can be changed or deleted
-->
<Deployments dir="apps/" />

</openejb>
