| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
abstract-sql-typeAn abstract SQL type to be used when automatically creating a table for the entity bean. Resin-CMP will use the abstract-sql-type and the database driver type to determine the actual type used to create the database table.
Defines the size of the entity cache. The default cache-size is 8192.
Defines how long a loaded bean will remain loaded. As long as a cached CMP bean is loaded, it doesn't need to query the database, saving time and database load. The default value is 5 seconds. cmp-fieldDefines one of the bean's fields to be managed by Resin-CMP. Since Resin-CMP will introspect the cmp-fields from the classes, the cmp-field is optional. cmp-fields are either Java primitives or serializable types, i.e. values in a database table. Relations between beans are configured in the relations section.
The SQL name is generated automatically from the cmp-field (or the getter method.) The getter method corresponds to the cmp-field and the SQL column . An EJB-QL query, always uses the cmp-field name, e.g. .The cmp-field can specify the SQL column name using sql-column.
The above descriptor would expect the following schema:
data-sourceSpecifies the database JNDI name for the DataSource. If unspecified, it defaults to the value in EJBServer. field-nameSpecifies the field name for a cmp-field definition. The field-name is the bean name for the Java getter method. So the field-name for getFoo is .methodConfiguration for a business method. Each business method is specified by a <signature>. The signature syntax is the same as Java function syntax without the return type. The arguments are optional and the method name can be "*". The best matching method will be used. Methods which match a method with specified args is better than a method with only a method name. And both are better than the default match.
query-functionAdds a new function to the EJB-QL language. The query-function must specify the function signature in Java syntax. The following types are allowed: int, double, boolean, String, Date and any. An optional attribute lets you provide custom functions.
query-loads-beanIf true, an ejbSelect or find query will load the beans in the query's select. If false, the query will only load the primary key and lazily load the bean when it's referenced. Normally, setting this true will give better performance.
Default: true by default. read-onlyConfigures a bean as read-only. Read-only entity bean values can be cached between calls even in "update" transactions . The cache time is configured with cache-time. resin-ejbTop-level configuration for the Resin-specific configuration.
resin-isolationConfigures the isolation level for a method. Each method is classified with either or isolation. methods only read database from the database. methods read and write to the database.By telling Resin which methods are read-only, Resin can effectively cache read values and reduce the database load. For methods defined by EJB as write methods, Resin will ignore the read-only value. setXXX, create, and remove methods always have or stronger isolation.For methods defined by EJB as read methods, Resin will use as a default.Default: the default value is signatureSpeficies a function signature, i.e. a method declaration, in Java syntax. In the case of <query-function>, <signature> specifies the name and types for a new EJB-QL function. sql-columnThe SQL column name for a field or relation. If is unspecified, it defaults to the field name. The value of sql-column is never used in the EJB queries. It's just used during SQL generation. For relations where the target bean has a compound primary key, the sql-column can specify a attribute to distinguish which part of the primary key to configure.
sql-typeThe SQL type to be used when automatically creating a table for the entity bean. The sql-type is the string that will be used in the CREATE TABLE.
|