Hi,
I tested the implementation of class ReferenceMap - it works as
expected. In class AnonymousPersistentField the persistent object is
used as map key, the field value (of the anonymous field) as map value
and the ReferenceMap use weak keys and hard values, thus all persistent
objects set in class AnonymousPersistentField should be GC (if the
persistent object was no longer referenced) - in theory this should
work, but it seems this doesn't work for you.
Could you please post the mapping of the involved classes MotdePasse and
Utilisateur (and of mapped sub/super-classes of these classes if any
exist).
Do you modify any source classes of OJB related to anonymous fields or
references?
regards,
Armin
Marwane wrote:
> Hi,
> we have a production application on system Windows Server that using :
> WebSphere 6.0
> OJB version 1.0.3
> the application generate a lot of dump file in the system witch cause a
> system crash .. in the log i find this :
> 1,095,332,808 [24] 2
> org/apache/ojb/broker/metadata/fieldaccess/AnonymousPersistentField
> 0x11841c40
> 1,095,332,784 [72] 2 org/apache/ojb/broker/util/ReferenceMap 0x1664db30
> 1,095,332,664 [262,160] 23,114 array of
> org/apache/ojb/broker/util/ReferenceMap$Entry 0x71b48528
> 38,548,064 [32] 4 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x60e5c2f0
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x229d1fd0
> 38,543,048 [32] 2 org/apache/ojb/broker/util/ReferenceMap$WeakRef
> 0x229d1ff0
> 38,543,016 [40] 4
> com/convergence/utile/habilitations/MotdePasse 0x229d20b8
> 38,542,032 [120] 14
> com/convergence/utile/habilitations/Utilisateur 0x2056fde0
> 38,146,872 [64] 6
> com/convergence/utile/habilitations/Profil 0x1e806358
> 390,528 [24] 1
> org/apache/ojb/broker/util/collections/ManageableArrayList 0x29d00308
> 3,032 [24] 1
> org/apache/ojb/broker/util/collections/ManageableArrayList 0x254d0d38
> 880 [128] 9 java/util/GregorianCalendar 0x205702b0
> 128 [40] 4 com/convergence/utile/organisation/Entite
> 0x21cca310
> 88 [32] 1 java/lang/String 0x2056ffa0
> 80 [24] 1
> org/apache/ojb/broker/util/collections/ManageableArrayList 0x2b1e6ee8
> 80 [24] 1 java/util/ArrayList 0x2056fdc8
> 64 [32] 1 java/lang/String 0x2056fed8
> 56 [32] 1 java/lang/String 0x2056ff10
> 56 [32] 1 java/lang/String 0x2056ff48
> 48 [32] 1 java/lang/String 0x2056fe98
> 16 [16] 0 java/lang/Boolean 0x101eccb0
> 16 [16] 0 java/lang/Boolean 0x101eccc0
> 880 [128] 9 java/util/GregorianCalendar 0x229d2430
> 64 [32] 1 java/lang/String 0x229d2120
> 16 [16] 0 java/lang/Boolean 0x101eccc0
> 48 [32] 1 java/lang/ref/ReferenceQueue 0x1664db10
> 24 [24] 0 java/lang/Long 0x229d20e8
> 1,095,332,784 [72] 2 org/apache/ojb/broker/util/ReferenceMap
> 0x1664db30
> 4,904 [32] 2 org/apache/ojb/broker/util/ReferenceMap$WeakRef
> 0x60e5c310
> 24 [24] 0 java/lang/Long 0x60e5c360
> 1,095,332,784 [72] 2 org/apache/ojb/broker/util/ReferenceMap
> 0x1664db30
> 38,547,920 [32] 4 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x659aea38
> 38,543,280 [32] 4 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x19f95b00
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x65d52218
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x675fd680
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x4a016de8
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x1b3b09c0
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x4384a5e8
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x270b7740
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x1c9d4ed0
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x505d07a0
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x3b8f8f10
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x6916b088
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x3d6fdbd0
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x14a30960
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x5d3cd108
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x13937968
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x1aa7b5f8
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x118db108
> 38,543,104 [32] 3 org/apache/ojb/broker/util/ReferenceMap$Entry
> 0x58115890
> There are 23,094 more children
>
>
> so, some object like 'org/apache/ojb/broker/util/ReferenceMap$Entry',
> 'org/apache/ojb/broker/util/ReferenceMap' ,
> org/apache/ojb/broker/metadata/fieldaccess/AnonymousPersistentField
> objects are consuming
> more than 1 GB (1,095,332,664 bytes) on heap.
>
>
> I need an explanation of this , please. and solution or test to do .
>
> thx in advance.
>
>
>
> ------------------------------------------------------------------------
>
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE descriptor-repository PUBLIC "-//Apache Software
Foundation//DTD OJB Repository//EN"
> "repository.dtd">
> <descriptor-repository version="1.0" isolation-level="read-uncommitted"
proxy-prefetching-limit="50">
> <jdbc-connection-descriptor jcd-alias="default"
default-connection="true" platform="Db2" jdbc-level="2.0" driver="
com.p6spy.engine.spy.P6SpyDriver" protocol="jdbc" subprotocol="db2"
dbalias="//localhost/DEV" username="db2admin" password="db2admin">
> <sequence-manager className="
org.apache.ojb.broker.util.sequence.SequenceManagerHighLowImpl">
> <attribute attribute-name="grabSize"
attribute-value="5"/>
> <attribute attribute-name="globalSequenceId"
attribute-value="true"/>
> <attribute attribute-name="globalSequenceStart"
attribute-value="10000"/>
> </sequence-manager>
> </jdbc-connection-descriptor>
>
>
> <!-- OJB INTERNAL MAPPINGS START HERE, DO NOT EDIT -->
> <!-- *************************************************************
-->
> <!-- The OJB HIGH/LOW SequenceManagerTable -->
> <!-- *************************************************************
-->
> <class-descriptor class="
org.apache.ojb.broker.util.sequence.HighLowSequence" table="OJB_HL_SEQ">
> <object-cache class="
org.apache.ojb.broker.cache.ObjectCacheEmptyImpl"/>
> <field-descriptor name="tableName" column="TABLENAME"
jdbc-type="VARCHAR" primarykey="true"/>
> <field-descriptor name="fieldName" column="FIELDNAME"
jdbc-type="VARCHAR" primarykey="true"/>
> <field-descriptor name="maxKey" column="MAX_KEY"
jdbc-type="BIGINT"/>
> <field-descriptor name="grabSize" column="GRAB_SIZE"
jdbc-type="INTEGER"/>
> <field-descriptor name="version" column="VERSION"
jdbc-type="INTEGER" locking="true"/>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB NAMED ROOTS TABLE, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="
org.apache.ojb.odmg.NamedRootsMap$NamedEntry" table="OJB_NRM">
> <field-descriptor name="name" column="NAME"
jdbc-type="VARCHAR" primarykey="true"/>
> <field-descriptor name="oid" column="OID_"
jdbc-type="LONGVARBINARY"/>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DLIST IMPLEMENTATION, DO NOT EDIT-->
> <!-- alternative implementation of DList -->
> <!-- *************************************************************
-->
> <class-descriptor class="org.apache.ojb.odmg.collections.DListImpl"
table="OJB_DLIST">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <collection-descriptor name="elements" element-class-ref="
org.apache.ojb.odmg.collections.DListEntry" auto-retrieve="true"
auto-update="none" auto-delete="none">
> <inverse-foreignkey field-ref="dlistId"/>
> </collection-descriptor>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DLIST ENTRY IMPLEMENTATION, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="
org.apache.ojb.odmg.collections.DListEntry" table="OJB_DLIST_ENTRIES">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <field-descriptor name="dlistId" column="DLIST_ID"
jdbc-type="INTEGER"/>
> <field-descriptor name="position" column="POSITION_"
jdbc-type="INTEGER"/>
> <field-descriptor name="oid" column="OID_"
jdbc-type="LONGVARBINARY" conversion="
org.apache.ojb.broker.accesslayer.conversions.Object2ByteArrFieldConversion
"/>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DBAG IMPLEMENTATION, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="org.apache.ojb.odmg.collections.DBagImpl"
table="OJB_DLIST">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <collection-descriptor name="elements" element-class-ref="
org.apache.ojb.odmg.collections.DListEntry" auto-retrieve="true"
auto-update="none" auto-delete="none">
> <inverse-foreignkey field-ref="dlistId"/>
> </collection-descriptor>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DSET IMPLEMENTATION, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="org.apache.ojb.odmg.collections.DSetImpl"
table="OJB_DSET">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <collection-descriptor name="elements" element-class-ref="
org.apache.ojb.odmg.collections.DSetEntry" auto-retrieve="true"
auto-update="none" auto-delete="none">
> <inverse-foreignkey field-ref="dlistId"/>
> </collection-descriptor>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DSET ENTRY IMPLEMENTATION, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="org.apache.ojb.odmg.collections.DSetEntry"
table="OJB_DSET_ENTRIES">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <field-descriptor name="dlistId" column="DLIST_ID"
jdbc-type="INTEGER"/>
> <field-descriptor name="position" column="POSITION_"
jdbc-type="INTEGER"/>
> <field-descriptor name="oid" column="OID_"
jdbc-type="LONGVARBINARY" conversion="
org.apache.ojb.broker.accesslayer.conversions.Object2ByteArrFieldConversion
"/>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DMAP IMPLEMENTATION, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="org.apache.ojb.odmg.collections.DMapImpl"
table="OJB_DMAP">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <collection-descriptor name="entries" element-class-ref="
org.apache.ojb.odmg.collections.DMapEntry" collection-class="
org.apache.ojb.broker.util.collections.ManageableHashSet"
auto-retrieve="true" auto-update="none" auto-delete="none">
> <inverse-foreignkey field-ref="dmapId"/>
> </collection-descriptor>
> </class-descriptor>
> <!-- *************************************************************
-->
> <!-- THIS IS THE OJB DMAP ENTRY IMPLEMENTATION, DO NOT EDIT-->
> <!-- *************************************************************
-->
> <class-descriptor class="org.apache.ojb.odmg.collections.DMapEntry"
table="OJB_DMAP_ENTRIES">
> <field-descriptor name="id" column="ID"
jdbc-type="INTEGER" primarykey="true" autoincrement="true"/>
> <field-descriptor name="dmapId" column="DMAP_ID"
jdbc-type="INTEGER"/>
> <field-descriptor name="keyOid" column="KEY_OID"
jdbc-type="LONGVARBINARY" conversion="
org.apache.ojb.broker.accesslayer.conversions.Object2ByteArrFieldConversion
"/>
> <field-descriptor name="valueOid" column="VALUE_OID"
jdbc-type="LONGVARBINARY" conversion="
org.apache.ojb.broker.accesslayer.conversions.Object2ByteArrFieldConversion
"/>
> </class-descriptor>
> <!-- END OF OJB INTERNAL MAPPINGS-->
> </descriptor-repository>
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]