OSCore Installation

Just as the requirements alluded to, there are two different ways to install OSCore: deployable oscore.jar as an EJB module to an application server, or including oscore.jar as a library in a web module.

EJB Installation

We cannot possible provide installation details for every applications server that OSCore supports natively or otherwise. We can, however, provide general information that may be useful for deploying either the EJB module or the example EAR module included.

When deployable oscore in one of your existing J2EE applications, you'll want to add the following to your application.xml file:

<module>

	<ejb>oscore.jar</ejb>

</module>

If your applications server isn't supported natively by OSCore, you'll need to create vendor-specific deployment descriptors to handle non-standard tags such as JNDI names, CMP mappings, and datasource names. For your convenience, the standard JNDI names and recommended CMP mappings are listed below:

Bean JNDI Name CMP Mappings
Sequence os.Sequence

Table name: OS_SEQUENCE
name -> NAME
actualCount -> COUNT

SequenceGenerator os.SequenceGenerator N/A
PropertyString os.PropertyString Table name: OS_PROPERTYSTRING
id -> ID
string -> VALUE
PropertyNumber os.PropertyString Table name: OS_PROPERTYNUMBER
id -> ID
number -> VALUE
PropertyDecimal os.PropertyDecimal Table name: OS_PROPERTYDECIMAL
id -> ID
decimal -> VALUE
PropertyData os.PropertyData Table name: OS_PROPERTYDATA
id -> ID
bytes -> VALUE
PropertyDate os.PropertyDate Table name: OS_PROPERTYDATE
id -> ID
date -> VALUE
PropertyEntry os.PropertyEntry Table name: OS_PROPERTYENTRY
id -> ID
entityName -> ENTITYNAME
entityId -> ENTITYID
type -> TYPE
key -> KEY
PropertyStore os.PropertyStore N/A

If you do create any vendor-specific deployment descriptors for any app servers not currently natively supports by OSCore, please email us the files at opensymphony-discuss@lists.sourceforge.net.

Besides the installation notes for the EJB installation, you may need to also read the Non-EJB Installation below, depending on your specific use of OSCore.

Non-EJB Installation

If you aren't going to be using the SequenceGenerator EJB or the EJB implementation of the ProperySet module, you won't have to bother with the above installation notes. However, depending on which implementations and providers you utilize for the various OSCore components, some specific installation tasks will be required.

OFBizPropertySet implementation

Besides ensuring that ofbcore-entity.jar and ofbcore-share.jar are accessible in the library path (usually WEB-INF/lib), you'll aso be required to edit/create some OpenForBuisness XML descriptors used by the Ofbiz Entity Engine. Visit the OpenForBusiness site for more information on how to configure the Entity Engine.

You'll also want to add the following info to your entitygroup.xml file:

	<entity-group group="default" entity="OSPropertyEntry" />
	<entity-group group="default" entity="OSPropertyString" />
	<entity-group group="default" entity="OSPropertyData" />
	<entity-group group="default" entity="OSPropertyDate" />
	<entity-group group="default" entity="OSPropertyDecimal" />
	<entity-group group="default" entity="OSPropertyNumber" />

If you don't have the sequence entity already configured in your entitygroup.xml file, you'll also want to add:

	<entity-group group="default" entity="SequenceValueItem" />

In your entitymodel.xml file, the following must be added:

	<entity entity-name="OSPropertyEntry" table-name="propertyentry" package-name="">
		<field name="id" type="numeric"/>
		<field name="entityName" type="long-varchar"/>
		<field name="entityId" type="numeric"/>
		<field name="propertyKey" type="long-varchar"/>
		<field name="type" col-name="propertytype" type="integer"/>
		<prim-key field="id"/>
	</entity>
	<entity entity-name="OSPropertyString" table-name="propertystring" package-name="">
		<field name="id" type="numeric"/>
		<field name="value" col-name="propertyvalue" type="very-long"/>
		<prim-key field="id"/>
	</entity>
	<entity entity-name="OSPropertyDate" table-name="propertydate" package-name="">
		<field name="id" type="numeric"/>
		<field name="value" col-name="propertyvalue" type="date-time"/>
		<prim-key field="id"/>
	</entity>
	<entity entity-name="OSPropertyData" table-name="propertydata" package-name="">
		<field name="id" type="numeric"/>
		<field name="value" col-name="propertyvalue" type="blob"/>
		<prim-key field="id"/>
	</entity>
	<entity entity-name="OSPropertyDecimal" table-name="propertydecimal" package-name="">
		<field name="id" type="numeric"/>
		<field name="value" col-name="propertyvalue" type="floating-point"/>
		<prim-key field="id"/>
	</entity>
	<entity entity-name="OSPropertyNumber" table-name="propertynumber" package-name="">
		<field name="id" type="numeric"/>
		<field name="value" col-name="propertyvalue" type="numeric"/>
		<prim-key field="id"/>
	</entity>

Likewise, if you didn't have the sequence entity already configured, you need to also add the following to your entitymodel.xml file:

	<entity entity-name="SequenceValueItem" package-name="">
		<field name="seqName" type="id-long-ne"></field>
		<field name="seqId" type="numeric"></field>
		<prim-key field="seqName" />
	</entity>

Log4J Logging implementation

If you are going to use Log4J as your logging provider, you'll need log4.jar included in your application library path. You'll also need a log4j.properties file somewhere in the application's library path, as Log4J requires this file to be available in order to function properly. You can read more about the Log4J configuration here.