|
| |
The Resin-CMP EJB Server is implemented as a JNDI resource. Like any
other resource, it is to be set up in resin.conf or web.xml.
The following stripped-down web.xml sets up Resin-CMP
so local clients can use java:comp/env/cmp to find the home
interfaces.
Because the EJB server is a JNDI resource, it can be placed in any
JNDI resource context: <web-app>, <host>, or <http-server>.
An EJBServer in the <host> context, for example, will be shared
across all applications for that host.
The following is a sample web.xml configuration. More
details are available in:
EJBServer will automatically read the *.ejb files in WEB-INF and
load their defined beans.
web.xml
<web-app>
<!-- Database configuration -->
<database>
<jndi-name>jdbc/test</jndi-name>
<driver type="org.gjt.mm.mysql.Driver">
<url>jdbc:mysql://localhost:3306/test</url>
</driver>
</database>
<!-- Resin-CMP server configuration -->
<ejb-server>
<jndi-name>java:comp/env/cmp</jndi-name>
<data-source>java:comp/env/jdbc/test</data-source>
</ejb-server>
</web-app>
|
EJBServer init-parameters
Parameter | Meaning | Default
|
auto-compile | If true, automatically generate the persistence and EJB code | true
|
create-database-schema | If the entity beans do not yet exist in the data-source, create the tables | false
|
data-source | The database's JNDI name | java:comp/env/jdbc/test
|
distributed | Set true for multiple parallel servers | false
|
ejb-config-dir | Directory to search for *.ejb files | WEB-INF
|
entity-cache-size | How many entity beans are cached | 8192
|
entity-cache-timeout | How long a loaded CMP bean can be cached before reloading | Infinity
|
resin-isolation | Whether updates should use row-locking (FOR UPDATE) or rely on the database's isolation database | database
|
jdbc-isolation | Selects the JDBC isolation for an update transaction | the database's default
|
transaction-timeout | How long a transaction should wait before timing out (in seconds) | 60
|
queue-connection-factory | Sets the JNDI name for the QueueConnectionFactory | none
|
topic-connection-factory | Sets the JNDI name for the TopicConnectionFactory | none
|
External protocols are generally implemented as servlets.
Only applications which expose an external interface will have
protocol servlets.
<!-- Burlap protocol configuration -->
<servlet-mapping>
<url-pattern id='/burlap/*'/>
<servlet-name id='com.caucho.burlap.EJBServlet'/>
</servlet-mapping>
|
Copyright © 1998-2006 Caucho Technology, Inc. All rights reserved.
Resin® is a registered trademark,
and HardCoretm and Quercustm are trademarks of Caucho Technology, Inc. | |
|