This configuration file can be extended to create and set properties on other classes.
A mapping file named easybeans-mapping.xml
provides the information that rmi is the CarolComponent, tm is the JOTM
component, and jms is the Joram component. This file is located in the
org.objectweb.easybeans.server package.
The following is an extract of the
easybeans-mapping.xml
file.
Note | |
---|---|
The mapping file is using a schema available at http://easybeans.ow2.org/xml/ns/xmlconfig/xmlconfig-mapping_10.xsd |
<?xml version="1.0" encoding="UTF-8"?> <xmlconfig-mapping xmlns="http://easybeans.ow2.org/xml/ns/xmlconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://easybeans.ow2.org/xml/ns/xmlconfig http://easybeans.ow2.org/xml/ns/xmlconfig/xmlconfig-mapping_1_0.xsd"> <class name="org.ow2.easybeans.server.ServerConfig" alias="config"> <attribute name="shouldWait" alias="wait" /> <attribute name="useMBeans" alias="mbeans" /> <attribute name="useNaming" alias="naming" /> <attribute name="initJACC" alias="jacc" /> <attribute name="directoryScanningEnabled" alias="scanning" /> <attribute name="startJMXConnector" alias="connector" /> <attribute name="registerDeployerMBean" alias="deployer" /> <attribute name="registerJ2EEServerMBean" alias="j2eeserver" /> <attribute name="description" /> </class> <class name="org.ow2.easybeans.component.Components" alias="components" /> <class name="org.ow2.easybeans.component.util.Property" alias="property" /> <package name="org.ow2.easybeans.component.carol"> <class name="CarolComponent" alias="rmi" /> <class name="Protocol" alias="protocol"> <attribute name="portNumber" alias="port" /> </class> </package> <class name="org.ow2.easybeans.component.cmi.CmiComponent" alias="cmi"> <attribute name="serverConfig" alias="config" /> <attribute name="eventComponent" alias="event" /> </class> <class name="org.ow2.easybeans.component.smartclient.server.SmartClientEndPointComponent" alias="smart-server"> <attribute name="portNumber" alias="port" /> <attribute name="registryComponent" alias="rmi" /> </class> <class name="org.ow2.easybeans.component.jotm.JOTMComponent" alias="tm" /> <class name="org.ow2.easybeans.component.joram.JoramComponent" alias="jms"> <attribute name="topic" isList="true" getter="getTopics" setter="setTopics" element="true"/> </class> <class name="org.ow2.easybeans.component.jdbcpool.JDBCPoolComponent" alias="jdbcpool" /> <class name="org.ow2.easybeans.component.remotejndiresolver.RemoteJNDIResolverComponent" alias="jndi-resolver"> </class> <package name="org.ow2.easybeans.component.hsqldb"> <class name="HSQLDBComponent" alias="hsqldb"> <attribute name="databaseName" alias="dbName" /> <attribute name="portNumber" alias="port" /> </class> <class name="User" alias="user"> <attribute name="userName" alias="name" /> </class> </package> <package name="org.ow2.easybeans.component.quartz"> <class name="QuartzComponent" alias="timer" /> </package> <package name="org.ow2.easybeans.component.mail"> <class name="MailComponent" alias="mail" /> <class name="Session" alias="session"> <attribute name="JNDIName" alias="jndiName" /> </class> <class name="MimePart" alias="mimepart"> <attribute name="subject" element="true" /> <attribute name="JNDIName" alias="jndiName" /> </class> <class name="MailAddress" alias="email" element-attribute="name" /> <class name="Auth" alias="auth"> <attribute name="username" alias="name" /> </class> </package> <class name="org.ow2.easybeans.component.event.EventComponent" alias="event"> <attribute name="eventService" alias="event-service" optional="true" /> </class> <class name="org.ow2.easybeans.component.jmx.JmxComponent" alias="jmx"> <attribute name="commonsModelerExtService" alias="modeler-service" optional="true" /> </class> <class name="org.ow2.easybeans.component.statistic.StatisticComponent" alias="statistic"> <attribute name="eventComponent" alias="event" /> <attribute name="jmxComponent" alias="jmx" /> </class> <package name="org.ow2.easybeans.component.depmonitor"> <class name="DepMonitorComponent" alias="depmonitor"> </class> <class name="ScanningMonitor" alias="scanning"> <attribute name="waitTime" alias="period" /> </class> <class name="LoadOnStartupMonitor" alias="loadOnStartup"> </class> </package> </xmlconfig-mapping>
Note | |
---|---|
This mapping file is referenced by the easybeans configuration
file using the XML namespace :
xmlns="http://org.ow2.easybeans.server" Each element configured within this namespace will use the
mapping done in the |
Users can define their own mapping by providing a file in a
package. The name of the the file must be
easybeans-mapping.xml or
element-mapping.xml
.
Example: For the element <easybeans
xmlns="http://org.ow2.easybeans.server">
, the resource
searched in the classloader is
org/ow2/easybeans/server/easybeans-mapping.xml
. And
for an element <pool:max>2</pool:max> with
xmlns:pool="http://org.ow2.util.pool.impl", the resource searched will
be org/ow2/util/pool/impl/easybeans-mapping.xml or
org/ow2/util/pool/impl/pool-mapping.xml.