You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by to...@apache.org on 2005/10/03 21:23:26 UTC
cvs commit: db-ojb/src/test/org/apache/ojb repository_junit.xml repository.dtd
tomdz 2005/10/03 12:23:26
Modified: src/java/org/apache/ojb/broker/metadata
RepositoryElements.java ClassDescriptor.java
RepositoryXmlHandler.java RepositoryTags.java
src/test/org/apache/ojb repository_junit.xml repository.dtd
Log:
Removed unused useObjectFactory attribute of class-descriptor
Added timeout attribute to object-cache definition
Fixed errors (wrong case for auto-* settings) in unit test repository
Revision Changes Path
1.45 +0 -2 db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryElements.java
Index: RepositoryElements.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryElements.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- RepositoryElements.java 1 Oct 2005 13:48:49 -0000 1.44
+++ RepositoryElements.java 3 Oct 2005 19:23:25 -0000 1.45
@@ -146,8 +146,6 @@
public static final int PROXY_PREFETCHING_LIMIT = 114;
- public static final int USE_OBJECT_FACTORY = 121;
-
public static final int SELECTBYPK_PROCEDURE = 123;
public static final int SELECTBYFK_PROCEDURE = 124;
1.114 +1 -13 db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java
Index: ClassDescriptor.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/ClassDescriptor.java,v
retrieving revision 1.113
retrieving revision 1.114
diff -u -r1.113 -r1.114
--- ClassDescriptor.java 1 Oct 2005 13:48:49 -0000 1.113
+++ ClassDescriptor.java 3 Oct 2005 19:23:25 -0000 1.114
@@ -61,8 +61,6 @@
public final class ClassDescriptor extends DescriptorBase
implements Serializable, XmlCapable
{
- private boolean useObjectFactory;
-
private String persistentFieldClassName;
private static final long serialVersionUID = -5212253607374173965L;
@@ -1543,16 +1541,6 @@
this.creationDescriptor = creationDescriptor;
}
- public boolean useObjectFactory()
- {
- return useObjectFactory;
- }
-
- public void setUseObjectFactory(boolean value)
- {
- this.useObjectFactory = value;
- }
-
//---------------------------------------------------------------
/**
* Change the descriptor for the insert procedure/function.
1.76 +1 -13 db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryXmlHandler.java
Index: RepositoryXmlHandler.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryXmlHandler.java,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- RepositoryXmlHandler.java 30 Sep 2005 21:45:15 -0000 1.75
+++ RepositoryXmlHandler.java 3 Oct 2005 19:23:26 -0000 1.76
@@ -310,18 +310,6 @@
{
m_CurrentCLD.getCreationDescriptor().setFactoryMethodName(factoryMethodName);
}
-
- /*
- *
- */
- String useObjectfactory = atts.getValue(RepositoryTags.getTagById(USE_OBJECT_FACTORY));
- if (isDebug)
- logger.debug(" " + RepositoryTags.getTagById(USE_OBJECT_FACTORY) + ": " + useObjectfactory);
- if(useObjectfactory != null && "true".equalsIgnoreCase(useObjectfactory))
- {
- m_CurrentCLD.setUseObjectFactory(true);
- }
-
// set refresh attribute
String refresh = atts.getValue(RepositoryTags.getTagById(REFRESH));
1.45 +0 -1 db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryTags.java
Index: RepositoryTags.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/metadata/RepositoryTags.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- RepositoryTags.java 1 Oct 2005 13:48:49 -0000 1.44
+++ RepositoryTags.java 3 Oct 2005 19:23:26 -0000 1.45
@@ -160,7 +160,6 @@
table.put("initialization-method", new Integer(INITIALIZATION_METHOD));
table.put("factory-class", new Integer(FACTORY_CLASS));
table.put("factory-method", new Integer(FACTORY_METHOD));
- table.put("useObjectFactory", new Integer(USE_OBJECT_FACTORY));
table.put("insert-procedure", new Integer(INSERT_PROCEDURE));
table.put("update-procedure", new Integer(UPDATE_PROCEDURE));
1.139 +8 -9 db-ojb/src/test/org/apache/ojb/repository_junit.xml
Index: repository_junit.xml
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository_junit.xml,v
retrieving revision 1.138
retrieving revision 1.139
diff -u -r1.138 -r1.139
--- repository_junit.xml 30 Sep 2005 21:48:46 -0000 1.138
+++ repository_junit.xml 3 Oct 2005 19:23:26 -0000 1.139
@@ -1235,8 +1235,8 @@
name="projects"
element-class-ref="org.apache.ojb.broker.Project"
auto-retrieve="true"
- auto-update="OBJECT"
- auto-delete="LINK"
+ auto-update="object"
+ auto-delete="link"
indirection-table="PERSON_PROJECT"
>
<fk-pointing-to-this-class column="PERSON_ID"/>
@@ -1270,8 +1270,8 @@
name="projects"
element-class-ref="org.apache.ojb.broker.ProjectWithArray"
auto-retrieve="true"
- auto-update="OBJECT"
- auto-delete="LINK"
+ auto-update="object"
+ auto-delete="link"
indirection-table="PERSON_PROJECT"
>
<fk-pointing-to-this-class column="PERSON_ID"/>
@@ -1313,8 +1313,8 @@
name="persons"
element-class-ref="org.apache.ojb.broker.Person"
auto-retrieve="true"
- auto-update="OBJECT"
- auto-delete="LINK"
+ auto-update="object"
+ auto-delete="link"
indirection-table="PERSON_PROJECT"
>
<fk-pointing-to-this-class column="PROJECT_ID"/>
@@ -3126,8 +3126,7 @@
<class-descriptor
class="org.apache.ojb.broker.InitializableObject"
- table="INITIALIZABLE_OBJECT"
- useObjectFactory="true">
+ table="INITIALIZABLE_OBJECT">
<field-descriptor name="id" column="ID" jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
1.68 +24 -25 db-ojb/src/test/org/apache/ojb/repository.dtd
Index: repository.dtd
===================================================================
RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/repository.dtd,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- repository.dtd 3 Oct 2005 12:20:15 -0000 1.67
+++ repository.dtd 3 Oct 2005 19:23:26 -0000 1.68
@@ -81,15 +81,15 @@
<!--
The jcdAlias attribute is a shortcut name for the defined connection
- descriptor. OJB use jcdAlias as key for the defined connections.
+ descriptor. OJB uses jcdAlias as key for the defined connections.
The default-connection attribute used to define if this connection
should used as default connection with OJB. You could define only
one connection as default connection. It is also possible to set
- the default connection at runtime using
+ the default connection at runtime using the
PersistenceBrokerFactory#setDefaultKey(...) method.
- If set 'true' you could use on PB-api a shortcut-method of the
- PersistenceBrokerFactory to lookup PersistenceBroker instances.
+ If set to 'true' you can use on PB-api a shortcut-method of the
+ PersistenceBrokerFactory to lookup a PersistenceBroker instances.
The platform attribute is used to define the specific RDBMS
Platform. This attribute corresponds to a
@@ -97,10 +97,6 @@
The jdbc-level attribute is used to specify the Jdbc compliance
level of the used Jdbc driver.
-
- The eager-release attribute was adopt to solve a problem occured when
- using OJB within JBoss (3.0 <= version < 3.2.2, seems to be fixed in jboss 3.2.2).
- Only use within JBoss.
The batch-mode attribute allow to enable JDBC connection batch support
(if supported by used database), 'true' value allows to enable per-session
@@ -110,22 +106,22 @@
OJB switch off batch modus, thus you have to do '...setBatchMode(true)' on each
obtained PB instance.
- The useAutoCommit attribute allow to set how OJB uses
+ The useAutoCommit attribute allows to set how OJB uses
the autoCommit state of the used connections. The default mode
- was 1.
- 0 - OJB ignores the autoCommit setting of the connection and do not
- try to change it. This mode could be helpfully if the
- connection don't let you set the autoCommit state
- (e.g. using datasources from application server).
- 1 - [default mode] set the connection's autoCommit state temporary to 'false' if needed
- (when using transaction) and restore the old state after use. In
- versions before OJB 1.0.4 the autoCommit state was explicit set 'true'
- when connection was created, now OJB expect that this was done by
- the jdbc-driver configuration. To enable old behavior set a custom attribute
- 'initializationCheck' to 'true'.
- 2 - this setting set autoCommit explicit 'false' when connection was created.
+ is 1.
+ 0 - OJB ignores the autoCommit setting of the connection and does not
+ try to change it. This mode could be helpful if the
+ connection doesn't let you set the autoCommit state
+ (e.g. using datasources from an application server).
+ 1 - [default mode] set the connection's autoCommit state temporary to 'false'
+ if needed (when using transactions) and restore the old state after use. In
+ OJB versions before 1.0.4 the autoCommit state was explicit set 'true'
+ when a connection was created, now OJB expect that this was done by
+ the jdbc-driver configuration. To enable the old behavior set the custom
+ attribute 'initializationCheck' to 'true'.
+ 2 - this setting sets autoCommit explicit 'false' when a connection is created.
- If the ignoreAutoCommitExceptions attribute is set 'true', all
+ If the ignoreAutoCommitExceptions attribute is set to 'true', all
exceptions caused by setting autocommit state, will be ignored.
Default mode 'false'.
@@ -138,7 +134,7 @@
for obtaining a jdbc connections.
If users don't want to keep this information the
repository.xml file, they could pass user/password
- using PBKey.java to obtain a PersistenceBroker
+ using PBKey.java while obtaining a PersistenceBroker instance.
-->
<!ATTLIST jdbc-connection-descriptor
jcd-alias CDATA #REQUIRED
@@ -192,6 +188,7 @@
<!ATTLIST object-cache
class CDATA #IMPLIED
strategy CDATA #IMPLIED
+ timeout CDATA #IMPLIED
>
<!--
@@ -353,8 +350,10 @@
that is to be used instead of a no argument constructor.
If the factory-class is specified the factory-method
also must be defined.
- factory-method refers to a static no-argument method
- of the factory-class class.
+ factory-method refers to a static or instance no-argument method
+ of the factory-class class. If the method is not static, then
+ the factory class must have a default or no-arg constructor by
+ which it can be instantiated.
The refresh attribute can be set to true to force OJB to refresh
instances when loaded from cache. It's set to false by default.
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org