Privately owned object delete problem

If I delete a privately owned object (B), AND delete its parent (object A, contains B), then the order of SQL deletes is incorrect:
DELETE FROM A
DELETE FROM B
If I just delete object A, then Toplink orders deletes properly:
DELETE FROM B
DELETE FROM A
NOW, the question is, can something be done to fix this because not deleting a privately owned object is not an option (its a long story, but there is a business logic related to this that deletes A when no more B's left, but there is no way to know that up front).
Thanks
- rustam -

There is a previous thread regarding some similar issues:
Order of delete in unit of work
The last 2 or 3 posts make me wonder if the issue is similar to the one you are experiencing.
Does that thread help?

Similar Messages

  • Remove private owned object

    I have counted a problem to remove a private owned object from database. The object is removed from toplink cache successfully but the database row still exists.
    OfferResult object contains multiple OfferDailyResult objects.
    The attribute in OfferResult:
    mktgElementTkey: String (primary key)
    offerDailyResults: ArrayList
    The attributes in OfferDailyResult:
    mktgElementTkey: String (primary key)
    resultDate: Timestamp (primary key)
    resultValue: String
    I am able to remove any OfferDailyResult object from offerDailyResults collection in application server. But the database row is still sitting in Offer_Daily_Result table.
    Is that because I have a Timestamp attribute in the primary key? How can I solve it?
    I'm using weblogic 9.2 and toplink 10.1.3. Since our application was migrated from lower version toplink to toplink 10.1.3, the old way to turn on sql log doesn't work. Could you also tell me how to turn on the sql log?
    Thanks,

    Here is the peseudo-code of removing OfferDailyResult
    object. I have trouble to turn on the Toplink SQL log
    in version 10.1.3. Could you tell me how to turn on
    it?
    public class OfferResult extends MktgElement {
    String mktgElementTkey;
    ArrayList lnk_TelemktgOfferDailyResult;
    public void removeDailyResult(String
    resultDateStr) {
    TelemktgOfferDailyResult dailyResult =
    this.getTelemktgOfferDailyResult(resultDateStr);
    dailyResult.getResultDate().setNanos(0);
    this.lnk_TelemktgOfferDailyResult.remove(this.getTele
    ktgOfferDailyResult(resultDateStr));
    Thanks,This code doesnt show how you are registering the object and then deleting it. Can you include the transaction code as well-the part where you acquire a unit of work, register the object you want to delete as well ?

  • Remove privately owned object: SQLException: cannot update ... to NULL

    I have a toplink descriptor called ToplinkRelationshipInfo which has a one-to-many mapping to a descriptor called ToplinkRelationshipAttribute. The mapping is privately owned and uses a foreign key from ToplinkRelationshipAttribute.info_id -> ToplinkRelationshipInfo.id. The ToplinkRelationshipAttribute has a one-to-one mapping back to the ToplinkRelationshipInfo.
    The toplink generated Java source for ToplinkRelationshipInfo has a removeFromAttributes method:
    public void removeFromAttributes(ToplinkRelationshipAttribute aToplinkRelationshipAttribute) {
         this.attributes.remove(aToplinkRelationshipAttribute);
         aToplinkRelationshipAttribute.setRelationshipInfo(null);
    }When deleting/removing one of these attributes, if I simply call the above method and then call commit on the unit of work I get a SQLException:
    Internal Exception: java.sql.SQLException: ORA-01407: cannot update ("WC"."WP_RELATIONSHIP_INFO_ATT"."RELATIONSHIP_INFO_ID") to NULL
    I understand that the reason for this is because the removeFromAttributes method is setting the attribute relationshipInfo member to null, which is causing an UPDATE on the attribute record with null on the required relationshipInfoId.
    As suggested in another thread I removed the line that sets the relationshipInfo member to null and I no longer get the exception.
    For maintenance reasons I'd prefer to modify as little generated toplink code as necessary, so I'd rather not have to modify the remove method; otherwise I'll have to go through and modify all these types of methods anytime I generate new Java source.
    So, how come toplink is generating the code that nulls these member variables if they have to be taken out later?
    Is there a way to configure the workbench project so that it does not generate this code, or is it necessary to modify these methods each time I generate the Java source?
    Thanks.

    In a 1-m mapping the relationship is stored in the database by the foreign key of the 1-1 (m-1) back reference. In a typical 1-m relationship if you just remove the object from the collection it will not update the database unless you also set the 1-1 back to null, (as it will still be referencing the old source and the relationship will be out of synch).
    In your case because the 1-m is privately owned and the target will be deleted, it does not need to have the 1-1 updated, so you are correct in removing the code.
    In have logged an enhancement request internally with the MW to have this code improved for private-owned 1-m relationships.
    In general the source code generation of the TopLink Mapping Workbench (or JDeveloper) is meant as a one-time generation for rapid prototyping, it is not required, and not two-way. Typically the object model will be used to provide application specific behavior, so will be maintained by hand after the initial prototype.

  • Moving Private Owned Objects?

    If I have a object that is privately owned, and I want to move it to another object, is there a way to do this without TopLink wanting to DELETE the object?
    By default, I realize that if a private object is unlinked from its owner, it will be deleted, but if it is reassigned in the same transaction, is there a way for this to simply UPDATE and to not execute the DELETE?
    Nate

    I do not believe this is possible. if you have scenarios where objects need to move between collections then do not mark them as privately-owned. You'll need to enhance you application to delete them in the cases where you need to.
    Doug

  • Need advice regarding the use of Private Owned

    Hello,
    We have the following JPA entity objects:
    @Entity
    public class Claim {
    @PrivateOwned
    @OneToMany(mappedBy = "claim", cascade = CascadeType.ALL)
    private List<ClaimLine> claimLineList;
    @Entity
    public class Bill {
    @OneToMany(mappedBy = "bill", cascade = CascadeType.ALL)
    private List<ClaimLine> claimLineList;
    @Entity
    public class ClaimLine {
    @ManyToOne
    @JoinColumn(name = "CLAI_ID", nullable = false)
    private Claim claim;
    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "BILL_ID")
    private Bill bill;
    Both Claim and Bill have many-to-one references to ClaimLine. The ClaimLine is Privately Owned by the Claim.
    Note that when a Claim is removed, the entire object graph is discarded, i.e. the Bill and ClaimLine objects are also removed. The Bill can be removed without removing the ClaimLine objects.
    The EclipseLink documentation [ http://wiki.eclipse.org/Using_EclipseLink_JPA_Extensions_%28ELUG%29#How_to_Use_the_.40PrivateOwned_Annotation ] specifies that:
    "+An object should not be the target in more than one relationship if it is the target in a privately owned relationship.+"
    Question: are we running a risk having the ClaimLine object as target in more than one relationship?
    Thanks.
    Best regards,
    -Sjoerd

    Hello,
    When you remove a Claim entity, you will need to clean up all references other entities might have back to the claim item. Because Claim has a privately owned relationship to ClaimLine, all references to the ClaimLines that are to be deleted also need to be cleaned up, or Bill will be inadvertently left referencing a deleted ClaimLine in the cache. If Bill is removed, references to it must be nulled out - specifically in the ClaimLine, but you have to do this in the application or get a constraint violation on the database anyway.
    The risk with privately owned objects is that they are deleted outside the normal constraint checking rules. That is, if ClaimLine is not marked for deletion but its owning Claim is, ClaimLine will not get deleted until the delete for Claim is processed. That means depending on delete ordering, if Bill is marked for delete, it could get processed first, and so deleted deleted before the Claim + ClaimLine, causing a dependency violation. As long as you are setting the ClaimLine->Bill relation to null you won't get a problem. If you are not, and bills are getting deleted first, you can order the dependencies manually so that Claim is always processed for deletes first using addConstraintDependencies on the Claim descriptor described at: http://wiki.eclipse.org/Using_Advanced_Unit_of_Work_API_%28ELUG%29#How_to_Use_the_addConstraintDependencies_Method_of_the_Descriptor
    Best Regards,
    Chris

  • Entity remove triggering select stmts on private owned relationships

    Hi All,
    When ever we do an entityManager.remove on an entity and commit, the eclipse link is doing a realAllQuery.execute (Select stmt) on each of the privateOwned entities of the given entity(irrespective of whether they are present or not) before actually deleting them .
    This is very much redundant especially if there are large number of entities to delete/cascade delete and each has multiple number of private owned rels - Lots of SELECT SQls , and time taken for these select sqls is very much higher than actual delete stmts. Is there a way to remove the private owned rels without selecting them.
    We are using the ecliselink 2.3.1 version.
    BTW
    This readAllQuery.execute on private owned entitites is triggered during CollectionMapping.recordPrivateOwnedRemovals method of eclipse link during commit.
    Any Input or suggestion greatly appreciated.
    Thanks,
    Sriram

    EclipseLink needs to load an object's private owned relationship to delete the objects, otherwise it does not know which objects to delete.
    The private owned objects can have their own private owned objects and dependent relationships that need to be deleted as well.
    EclipseLink does perform a delete-all optimization for a privately owned OneToMany where the target does not have any dependent relationships (or inheritance/multiple tables/ locking).
    This will occur for a simple OneToMany but most have relationships of their own that prevents the optimization.
    This optimization can also be configured using the @DeleteAll annotation.
    EclipseLink also supports delete cascading on the database, if you have created your foreign key constraint to cascade on delete, or are using EclipseLink to create your schema.
    If you use @CascadeOnDelete, then the related objects should not be loaded.
    If you still think you have more SQL than you think is correct, please include your object model code, and the SQL log for the delete.

  • Private owned delete not working

    Hi
    I am stumped by a problem trying to delete a child object from a parent's collection.
    I have set Private Owned on for the 1-many mapping, but when I remove the privately owned child from the parent and commit, no DELETE SQL is produced. The only difference from classes that I can delete by removing from the parent is that my child class does not specify direct-mapped primary keys, but rather references to the parent objects:
    public class ServiceAsset extends ServiceAssetValue implements Ownable {
         private Service service;
         private AssetType assetType;
    Here are the steps I use to remove the child:
    public void delete(AssetType assetTypeProto, Service serviceProto) throws PersistenceException {
         Service service = (Service)TopLinkSession.getServerSessionInstance().acquireClientSession().readObject(serviceProto);
         AssetType assetType = (AssetType)TopLinkSession.getServerSessionInstance().acquireClientSession().readObject(assetTypeProto);
         this.getWriteSession().logMessages();
         ServiceAsset serviceAsset = new ServiceAsset();
         serviceAsset.setService(service);
         serviceAsset.setAssetType(assetType);
         serviceAsset = (ServiceAsset)TopLinkSession.getServerSessionInstance().acquireClientSession().readObject(serviceAsset);
         ServiceAsset workingCopyServiceAsset = (ServiceAsset)getUnitOfWork().registerExistingObject(serviceAsset);
         Service workingCopyService = (Service)getUnitOfWork().registerExistingObject(service);
         workingCopyService.getServiceAssets().remove(workingCopyServiceAsset);
         this.getUnitOfWork().printRegisteredObjects();
         commit();
    Here is the mapping specification in the parent descriptor:
    <database-mapping>
    <attribute-name>serviceAssets</attribute-name>
    <read-only>false</read-only>
    <reference-class>com.xxxx.ServiceAsset</reference-class>
    <is-private-owned>true</is-private-owned>
    <uses-batch-reading>false</uses-batch-reading>
    <indirection-policy>
    <mapping-indirection-policy>
    <type>oracle.toplink.internal.indirection.TransparentIndirectionPolicy</type>
    </mapping-indirection-policy>
    </indirection-policy>
    <container-policy>
    <mapping-container-policy>
    <container-class>oracle.toplink.indirection.IndirectList</container-class>
    <type>oracle.toplink.internal.queryframework.ListContainerPolicy</type>
    </mapping-container-policy>
    </container-policy>
    <source-key-fields>
    <field>SERVICES.SERVICEID</field>
    </source-key-fields>
    <target-foreign-key-fields>
    <field>SERVICEASSETS.SERVICEID</field>
    </target-foreign-key-fields>
    <type>oracle.toplink.mappings.OneToManyMapping</type>
    </database-mapping>
    Is there an obvious mistake I am making?
    James
    p.s. The debug output from Toplink is
    ServerSession(9727266)--client acquired
    ClientSession(26675936)--Execute query ReadObjectQuery(com.xxx.ServiceAsset)
    ClientSession(23126121)--acquire unit of work: 21690871
    UnitOfWork(21690871)--Register the existing object com.xxx.ServiceAsset@12d26d2
    UnitOfWork(21690871)--Register the existing object com.xxx.AssetType@43487e
    UnitOfWork(21690871)--Register the existing object com.xxx.Service@4a96a
    UnitOfWork(21690871)--Register the existing object com.xxx.ServiceProvider@974600
    UnitOfWork(21690871)--Register the existing object com.xxx.Application@c3e967
    UnitOfWork(21690871)--Register the existing object com.xxx.Domain@1b963c4
    UnitOfWork(21690871)--Register the existing object com.xxx.Service@4a96a
    UnitOfWork(21690871)--Register the existing object com.xxx.DomainUrl@1ef3ccd
    UnitOfWork(21690871)--Register the existing object com.xxx.Domain@1b963c4
    UnitOfWork(21690871)--Register the existing object com.xxx.StatusType@166aab6
    UnitOfWork(21690871)--Register the existing object com.xxx.Service@4a96a
    UnitOfWork(21690871)--Register the existing object com.xxx.ServiceAsset@12d26d2
    UnitOfWork(21690871)--Register the existing object com.xxx.ServiceAsset@f77511
    UnitOfWork(21690871)--Register the existing object com.xxx.AssetType@2eef15
    UnitOfWork(21690871)--Register the existing object com.xxx.Service@4a96a
    UnitOfWork(21690871)--Register the existing object com.xxx.ServiceAsset@a974c7
    UnitOfWork(21690871)--Register the existing object com.xxx.AssetType@3526cf
    UnitOfWork(21690871)--Register the existing object com.xxx.Service@4a96a
    UnitOfWork(21690871)--Register the existing object com.xxx.ServiceAsset@150f0a7
    UnitOfWork identity hashcode: 21690871
    Deleted Objects:
    All Registered Clones:
    Key: [111] Identity Hash Code:4521906 Object: com.xxx.Domain@44ffb2
    Key: [2] Identity Hash Code:22185277 Object: com.xxx.AssetType@152853d
    Key: [1] Identity Hash Code:24431393 Object: com.xxx.ServiceProvider@174cb21
    Key: [1 11] Identity Hash Code:22007194 Object: com.xxx.ServiceAsset@14fcd9a
    Key: [653] Identity Hash Code:25228613 Object: com.xxx.DomainUrl@180f545
    Key: [1] Identity Hash Code:21789336 Object: com.xxx.AssetType@14c7a98
    Key: [0] Identity Hash Code:1079807 Object: com.xxx.Application@1079ff
    Key: [R] Identity Hash Code:22129680 Object: com.xxx.StatusType@151ac10
    Key: [11] Identity Hash Code:954895 Object: com.xxx.Service@e920f
    Key: [2 11] Identity Hash Code:2547660 Object: com.xxx.ServiceAsset@26dfcc
    Key: [5] Identity Hash Code:25619834 Object: com.xxx.AssetType@186ed7a
    Key: [5 11] Identity Hash Code:20050612 Object: com.xxx.ServiceAsset@131f2b4
    New Objects:
    UnitOfWork(21690871)--begin unit of work commit
    ServerSession(9727266)--Connection(9256290)--TopLink, version: OracleAS TopLink
    - 10g (9.0.4.2) (Build 040311)
    ServerSession(9727266)--Connection(9256290)--connecting session: Default
    ServerSession(9727266)--Connection(9256290)--connecting(DatabaseLogin(
    platform=>Oracle9Platform
    user name=> "xxx"
    datasource URL=> "jdbc:oracle:thin:@kfir.xxx.com:1521:ORTD"
    ClientSession(30940873)--client released
    ClientSession(30227927)--client released
    ClientSession(26675936)--client released
    ServerSession(9727266)--Connection(9256290)--Connected: jdbc:oracle:thin:@kfir.xxxxx.com:1521:ORTD
    User: xxxxxx
    Database: Oracle Version: Oracle9i Release 9.2.0.1.0 - Production
    JServer Release 9.2.0.1.0 - Production
    Driver: Oracle JDBC driver Version: 9.2.0.1.0
    ClientSession(23126121)--Connection(9256290)--begin transaction
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.Application@1079ff)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.AssetType@152853d)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.AssetType@14c7a98)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.AssetType@186ed7a)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.ServiceProvider@174cb21)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.StatusType@151ac10)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.Service@e920f)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.DomainUrl@180f545)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.Domain@44ffb2)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.ServiceAsset@131f2b4)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.ServiceAsset@26dfcc)
    UnitOfWork(21690871)--Execute query WriteObjectQuery(com.xxx.ServiceAsset@14fcd9a)
    ClientSession(23126121)--Connection(9256290)--commit transaction
    ServerSession(9727266)--Connection(9256290)--disconnect
    UnitOfWork(21690871)--end unit of work commit
    UnitOfWork(21690871)--release unit of work

    James
    I have revised the code to show that the ServiceAsset is included in the cache Service object's collection, the Service working copy's collection acquired through the UOW before the remove() call, and still exists after the remove() call. I also show that at all times the ServiceAsset's service is never set to null, by accessing the Service's collection via the ServiceAsset.
    What is the remove() method actually doing, if Service specifies serviceAssets as java.util.Collection, serviceAssets get instantiated as new java.util.ArrayList, and MW specifies IndirectList for indirection?
    The wierd thing is that the cached Service object's serviceAsset collection actually grows after the remove() is called on the working copy.
    Thanks if you can offer any further ideas.
    James
    public void delete(AssetType assetTypeProto, Service serviceProto) throws PersistenceException {
         ServerSession ss = (ServerSession)SessionManager.getManager().getSession("Default");
         ClientSession cs = ss.acquireClientSession();
         UnitOfWork uow = cs.acquireUnitOfWork();
         Service service = (Service)cs.readObject(serviceProto);
         for (Iterator it =service.getServiceAssets().iterator(); it.hasNext(); ) {
              ServiceAsset sa = (ServiceAsset)it.next();
              System.out.println(sa.getService().getServiceId() + " | " + sa.getAssetType().getAssetTypeId());
         AssetType assetType = (AssetType)cs.readObject(assetTypeProto);
         uow.logMessages();
         ServiceAsset serviceAsset = new ServiceAsset();
         serviceAsset.setService(service);
         serviceAsset.setAssetType(assetType);
         serviceAsset = (ServiceAsset)cs.readObject(serviceAsset);
         System.out.println("ServiceAsset to delete: serviceId: " + serviceAsset.getService().getServiceId() + " and assetTypeId: " + serviceAsset.getAssetType().getAssetTypeId());
         System.out.println("Does ServiceAsset to delete exist in Service collection? " + serviceAsset.getService().getServiceAssets().contains(serviceAsset));
         System.out.println("Does ServiceAsset to delete exist in Service collection again? " + service.getServiceAssets().contains(serviceAsset));
         ServiceAsset workingCopyServiceAsset = (ServiceAsset)uow.registerExistingObject(serviceAsset);
         Service workingCopyService = (Service)uow.registerExistingObject(service);
         System.out.println("ServiceAsset Working Copy to delete: serviceId: " + workingCopyServiceAsset.getService().getServiceId() + " and assetTypeId: " + workingCopyServiceAsset.getAssetType().getAssetTypeId());
         System.out.println("Does ServiceAsset Working Copy to delete exist in Service Working Copy collection? " + workingCopyServiceAsset.getService().getServiceAssets().contains(workingCopyServiceAsset));
         System.out.println("Does ServiceAsset Working Copy to delete exist in Service Working Copy collection again? " + workingCopyService.getServiceAssets().contains(workingCopyServiceAsset));
         workingCopyService.getServiceAssets().remove(workingCopyServiceAsset);
         System.out.println("Does ServiceAsset Working Copy to delete exist in Service Working Copy collection? " + workingCopyServiceAsset.getService().getServiceAssets().contains(workingCopyServiceAsset));
         System.out.println("Does ServiceAsset Working Copy to delete exist in Service Working Copy collection again? " + workingCopyService.getServiceAssets().contains(workingCopyServiceAsset));
         uow.commit();
         service = (Service)cs.readObject(serviceProto);
         for (Iterator it =service.getServiceAssets().iterator(); it.hasNext(); ) {
              ServiceAsset sa = (ServiceAsset)it.next();
              System.out.println(sa.getService().getServiceId() + " | " + sa.getAssetType().getAssetTypeId());
    ServerSession(9089012)--client acquired
    ClientSession(11633812)--acquire unit of work: 22482780
    ClientSession(11633812)--Execute query ReadObjectQuery(com.xxx.ce
    ntral.Service)
    11 | 1
    11 | 2
    11 | 5
    ClientSession(11633812)--Execute query ReadObjectQuery(com.xxx.ce
    ntral.AssetType)
    ClientSession(11633812)--Execute query ReadObjectQuery(com.xxx.ce
    ntral.ServiceAsset)
    ServiceAsset to delete: serviceId: 11 and assetTypeId: 5
    Does ServiceAsset to delete exist in Service collection? true
    Does ServiceAsset to delete exist in Service collection again? true
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.ServiceAsset@773d03
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.AssetType@da5bc0
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Service@6f19d5
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.ServiceProvider@4a0ac5
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Application@12cd8d4
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Domain@15da7d
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Service@6f19d5
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.DomainUrl@34f445
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Domain@15da7d
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.StatusType@d8c3ee
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Service@6f19d5
    ServiceAsset Working Copy to delete: serviceId: 11 and assetTypeId: 5
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.ServiceAsset@c707c1
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.AssetType@19ccb73
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Service@6f19d5
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.ServiceAsset@15b6aad
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.AssetType@12e7cb6
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.Service@6f19d5
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.ServiceAsset@773d03
    UnitOfWork(22482780)--Register the existing object com.xxx.centra
    l.ServiceAsset@1f1e666
    Does ServiceAsset Working Copy to delete exist in Service Working Copy collectio
    n? true
    Does ServiceAsset Working Copy to delete exist in Service Working Copy collectio
    n again? true
    Does ServiceAsset Working Copy to delete exist in Service Working Copy collectio
    n? true
    Does ServiceAsset Working Copy to delete exist in Service Working Copy collectio
    n again? true
    UnitOfWork(22482780)--begin unit of work commit
    ServerSession(9089012)--Connection(12832866)--TopLink, version: OracleAS TopLink
    - 10g (9.0.4.2) (Build 040311)
    ServerSession(9089012)--Connection(12832866)--connecting session: Default
    ServerSession(9089012)--Connection(12832866)--connecting(DatabaseLogin(
    platform=>Oracle9Platform
    user name=> "skynetdev"
    datasource URL=> "jdbc:oracle:thin:@kfir.xxx.com:1521:ORTD"
    ServerSession(9089012)--Connection(12832866)--Connected: jdbc:oracle:thin:@kfir.
    surfkitchen.com:1521:ORTD
    User: SKYNETDEV
    Database: Oracle Version: Oracle9i Release 9.2.0.1.0 - Production
    JServer Release 9.2.0.1.0 - Production
    Driver: Oracle JDBC driver Version: 9.2.0.1.0
    ClientSession(11633812)--Connection(12832866)--begin transaction
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.Application@14f5021)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.AssetType@fd9b97)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.AssetType@f12b72)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.AssetType@1bdbf9d)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.ServiceProvider@1092447)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.StatusType@1277a30)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.Service@91520)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.DomainUrl@90ed81)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.Domain@bb6255)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.ServiceAsset@b890dc)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.ServiceAsset@46a09b)
    UnitOfWork(22482780)--Execute query WriteObjectQuery(com.xxx.cent
    ral.ServiceAsset@ce3b62)
    ClientSession(11633812)--Connection(12832866)--commit transaction
    ServerSession(9089012)--Connection(12832866)--disconnect
    UnitOfWork(22482780)--end unit of work commit
    UnitOfWork(22482780)--release unit of work
    ClientSession(11633812)--Execute query ReadObjectQuery(com.xxx.ce
    ntral.Service)
    11 | 1
    11 | 2
    11 | 5
    11 | 5
    ServerSession(9089012)--client acquired
    ClientSession(4496124)--Execute query ReadObjectQuery(com.xxx.cen
    tral.Service)
    10-Jun-2004 14:59:17 org.apache.struts.util.PropertyMessageResources <init>
    INFO: Initializing, config='org.apache.struts.taglib.html.LocalStrings', returnN
    ull=true
    ClientSession(11633812)--client released
    ClientSession(4496124)--client released

  • Private-owned deletes and batch writing test case

    Has someone dealt with the following scenario ?
    I have an order containing order items a a private owned one-to-many relation ship.
    When i delete many order lines toplink generates the delete commands for order items and orders. When using batch writing the delete commands are generated in a way that the batch writing is useless (each delete command is generated on its own batch command as the following:
    [TopLink Finer]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--Begin batch statements
    [TopLink Fine]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--DELETE FROM TL_ORDER_ITEM WHERE (ORDER_ID = ?)
    [TopLink Fine]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--     bind => [1]
    [TopLink Finer]: 2008.03.03 05:57:10.343--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--End Batch Statements
    [TopLink Finest]: 2008.03.03 05:57:10.359--UnitOfWork(8066625)--Thread(Thread[main,5,main])--Execute query DeleteObjectQuery( Customer Order #26 Date Ordered: java.util.GregorianCalendar[time=?,areFieldsSet=false,areAllFieldsSet=true,lenient=true,zone=sun.util.calendar.ZoneInfo[id="Europe/Paris",offset=3600000,dstSavings=3600000,useDaylight=true,transitions=184,lastRule=java.util.SimpleTimeZone[id=Europe/Paris,offset=3600000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=2,startMonth=2,startDay=-1,startDayOfWeek=1,startTime=3600000,startTimeMode=2,endMode=2,endMonth=9,endDay=-1,endDayOfWeek=1,endTime=3600000,endTimeMode=2]],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2004,MONTH=9,WEEK_OF_YEAR=43,WEEK_OF_MONTH=4,DAY_OF_MONTH=22,DAY_OF_YEAR=296,DAY_OF_WEEK=6,DAY_OF_WEEK_IN_MONTH=4,AM_PM=0,HOUR=0,HOUR_OF_DAY=0,MINUTE=0,SECOND=0,MILLISECOND=0,ZONE_OFFSET=3600000,DST_OFFSET=3600000] Order Total: 2550.0)
    [TopLink Finest]: 2008.03.03 05:57:10.359--UnitOfWork(8066625)--Thread(Thread[main,5,main])--Register the existing object Order Item: #5 Quantity: 1
    [TopLink Finer]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--Begin batch statements
    [TopLink Fine]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--DELETE FROM TL_CUSTOMER_ORDER WHERE (ORDER_ID = ?)
    [TopLink Fine]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--     bind => [1]
    [TopLink Finer]: 2008.03.03 05:57:10.359--ClientSession(22130853)--Connection(27081530)--Thread(Thread[main,5,main])--End Batch Statements
    If the test case does not define a private owned relation and all the deletes are done in the toplink application (first order items and the orders then the bach writing contains all the deletes.
    Any hint to have batch writing and private-owned deletes behaving on the same batch chunk on Toplink 10.1.3.3 ?

    Ok ill try to make a incompete code with the example of the problem in comments.
    class studenttest;
    //this is the messed up part all the way at the bottom of the class
                case 6:
                    ts.write(NodeList);
                    break;\\\\\\\\\\\\\\
    public class TStream{
    private StudentNodeList NodeList = new StudentNodeList();
    //calls this method
    //had it as public void write (StudentNodeList NodeList)
        public void write(Student NodeList)
            try
                output = new PrintWriter("database.txt");
                for(int i = 0; i < 5; i++)
    // had it as output.print(NodeList.equals(LastName) + "\t");
                    output.print(NodeList.getFirstname() + "\t");
                    output.print(NodeList.getLastname() + "\t");
                    output.print(NodeList.getID() + "\t");
                    output.print(NodeList.getyear() + "\t"); 
                    output.print(NodeList.getgpa() + "\t");   
                    output.println();
              }

  • Privately Owned and Cascade Delete in DB

    HI,
    What is the relationship between setting privately owned in Toplink vs creating a cascade delete in Oracle DB? If I've the cascade delete in DB then what is the advantage of setting the privately owned flag in toplink?
    Thanks

    If you only set the cascade delete option in the database, then TopLink will have no knowledge that the private object was deleted (or that it is private in general). This would mean that TopLink would not remove the private object from the cache or process it as have being deleted. In general this may not cause your app any direct issues if you never read the private object directly as it will eventually garbage collect from the cache.
    Making the relationship privately own in TopLink will also ensure the following:
    - If you replace the private object with another, or set it to null, TopLink will delete the old object on the update of the source. Cascade delete only works on deletion.
    - If the relationship is a 1-m and you remove an object from the collection it will be removed.
    - If you refresh the parent object, by default the child will also be refreshed.
    - If you merge the parent object, by default the child will also be merged.

  • APPLET DELETION PROBLEM: CARD TERMIN AL ERROR

    Hello.
    I have developed several on-card packages. First is the library package (package1), containing no applets. And the other package (package2) contains serverApllet that uses libraries from the package1. The strange problem occurs during the deletion of the serverApplet package2. It has to be deleted first, only then a library package1 can be deleted.
    I've implemented uninstall() method of the serverApplet, that sets all references to the library instances to null and requests Objects deletion. The problem is:
    that after calling:
    delete -r |package2  //i.e. server package deletionJCOP Shell always returns JCException:
    jcshell: Error code: -6 (Card Terminal error)
    jcshell:Communication problems: nullIt allways happens, when I am deleting package2. After i connect to the same simulation session, there is no more serverApllet package2, i.e. it was deleted. Then a library package1 can be successfully deleted.
    Could anyone tell me what might be the reason of such an error?
    Now i am trying the deletion only in simulator. I am not sure in trying it on-card, because i am not sure that i will be able to delte it from the card.
    Thanks for a help,
    Best regards,
    Eve
    Message was edited by:
    Ieva

    Yes, your advice was very useful for me. I had to read JCVM and JCRE specification
    one time more. And i found out that certainly to make applet and its package deletable:
    1 .no references to static memory can remain (i.e. must be set to null);
    2. in case the shareable interface is used, we must have in mind that no references to server SIO objects must remain. Regarding this second sentence i have to poin, that i found out the example in Java Card Kit v2.2.2 with A, B and C applets using shareable interfaces and static references.
    I hope this might help people, who might koin the same problem.
    Thanks, lexdabear.
    Best regards,
    Eve

  • ORA-28336: cannot encrypt SYS owned objects

    Hi ,I am getting the following error during impdp.
    Processing object type SCHEMA_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
    ORA-31693: Table data object "IDCFAPP"."ROBJECTOFSERVICE" failed to load/unload and is being skipped due to error:
    ORA-28336: cannot encrypt SYS owned objects
    any suggestions?

    ORA-31693: Table data object string failed to load/unload and is being skipped due to error: string
    Cause: Table failed to load or unload due to some error.
    Action: Check load/unload error, correct problem and retry command.
    This error is most likely because the SQL statements were run from the SYS user account
    ~ Madrid

  • Private Owned, Conform Results in Unit Of Work, ...

    I'd like to have some precision on Private Owned, Conform Results in Unit Of Work, Use joining, Use Batch Reading, ...
    Thank in advance

    Think of Private Owned as "if I delete the source, should I delete the target". So if you have a 1-1 between Customer and Address, if you delete a customer, should you delete their associated address automatically? If so, then it's private owned.
    If you have a 1-M, say a Manager has 1-M to ManagedEmployees, if you remove a ManagedEmployee from a manager, should it be deleted from the database? Probably not, you may simply be assigning them to another Manager... So, it's probably not private owned.
    Don't use the Conform Results in Unit Of Work in the mapping work bench, that sets up a default behavior for queries on that class, and I prefer to set it as needed, not globally. Conforming a query is unit of work related. Imagine you have a UnitOfWork and then query for all Customers from "Ottawa". Imagine you get back 5 from the database. Then in the unit of work you change one of the customers from "Ottawa" to "Kanata". Then you query the unit of work again (before committing) to find all customers in "Ottawa". The default behavior of TopLink would be to return the customer that has moved to "Kanata", because as far as the database is concerned you haven't committed the change, so he's still technically in Ottawa. If you turned on conforming for that class, or for the specific query, then you would NOT get the customer that moved (at a performance cost, of course).
    The docs on Join/Batch reading are pretty good, see 6-6 of the Using TopLink manual in the optimization section. The option in the mapping workbench lets you setup defaults for the relationship, but again, my preference has always been to set it on a per query basis... This gives you a way to centralize the default behavior for batching and joining for certain relationships.
    - Don

  • Calling a method in an owning object

    I have an application that involves an object (B) that is a member (not a sub-class) of another object (A). Within the owned object (B) I want to call up a method from the owning object A. E.g I would like to do something like this:
    class A
    object B; // B is a member of A
    methodX( )
    class B
    owner.methodX( ); // invoke the methodX that is a member of object A.
    Is this possible and how can i do it?

    No, there is no implicit reference to an "owning" object. Think about the following code:
    class Parent {
      Child child
      Parent(Child child) { this.child = child; }
      void doSomething() {}
    class Child {
    class Test {
    public static void main(String[] args) {
       Child child = new Child();
       Parent p1 = new Parent(child);
       Parent p2 = new Parent(child);
    }So the two instances of Parent both have a reference to the same instance of Child. Which one is the "owner"?
    You'll have to explicitly give your "child" object a reference to the "owner" object in order to call methods on it

  • Windows 7 IPv4 resolution of own host name problem

    Hi,
    Preconditions:
    I have a Windows 7 SP1 with 2 network adapters. LAN1 has a static IP address and shall be used by our applications.
    LAN2 uses DHCP. DNS or WINS is servers are not available.
    For the applications it is necessary that the own FQDN resolves always to the same IPv4 address ( of LAN1).
    I test this with the command "ping -4 -n 1 own.fqdn".
    Problem:
    When LAN2 has a ethernet connection, but there is no DHCP server it gets a autoconfiguration IP address starting with 169.254 .
    In this case the own FQDN resolves to the  169.254.X.Y address and confuses our application.
    Questions:
    How can I avoid this change of the name resolution?
    How decides the OS to which adapters address the own FQDN resolves?
    Thanks
    gs2013

    Hi,
    Network one is not connected to the network you think it should be connected to but that it is in fact connected to the 169.254.x.y network
    instead of another network.
    Windows doesn't make up IP address so if your computer is getting one it is connected to a network with a DHCP server.
    please verify that you have the network cards plugged into the network you think they are plugged into and that you haven't reversed them
    accidently
    Then make sure you disable the first one when you choose the second one adapter.
    Meanwhile, please refer to the article below to force the adapter:
    http://social.technet.microsoft.com/Forums/windows/en-US/64451b61-b8d6-4e16-a396-ea418753f1c6/force-internet-connection-to-desired-network-adapter
    Karen Hu
    TechNet Community Support

  • Two Related (?) file deleting problems in Finder and Time Machnine

    My internal drive is partition into two volumes. In the second one (the "non-boot" one), I was have trouble putting files in the trash that were locked. As I was tracking that down I coincidentally(?) started having another problem.
    I started getting a message that the files being put into the trash must be deleted immediately. I check permissions and I had read/write Privileges in the user account I'm normally logged into. However, If I logged into my administrator account, I could put things in the trash without deleting them. I noticed that ignore ownerships wasn't checked, so I checked that.
    That allowed my to put files into the trash without immediately deleting them. I went ahead and deleted the files I wanted to get rid of. However, I'm wondering if there was another issue because I am lead to understand that the ownership privileges shouldn't have necessitated checking "ignore ownerships"?
    Also, I had trouble deleting the backups of those files and folders in time machine. I can delete most of it. But for one folder (and all the folders in which it resides in the hierarchy) I can't deleted it. I tell it to delete backups of that folder (or folders it is in), I put in the password, and goes "ding". But nothing disappears...
    (After I wrote this, I tried unchecking "ignore ownerships" and the problem did not reappear. I can still put files in the trash without the immediate deletion problem.)
    Message was edited by: davidpsummers
    Message was edited by: davidpsummers

    Pondini wrote:
    davidpsummers wrote:
    Also, I had trouble deleting the backups of those files and folders in time machine. I can delete most of it. But for one folder (and all the folders in which it resides in the hierarchy) I can't deleted it. I tell it to delete backups of that folder (or folders it is in), I put in the password, and goes "ding". But nothing disappears...
    Are you doing that via the Finder or Terminal? If so, that's not the way to delete backups. See #12 in [Time Machine - Frequently Asked Questions|http://web.me.com/pondini/Time_Machine/FAQ.html] (or use the link in *User Tips* at the top of the +Time Machine+ forum).
    And now I'm getting an error in time machine. "Files can't be copied onto the backup disk because it appears to be "read only"". I do get info on the disk, and my account has Read & Write privleges, but it say "You can only read" above that".
    The Finder or Terminal deletions may have corrupted your backups. Repair them, per #A5 in [Time Machine - Troubleshooting|http://web.me.com/pondini/Time_Machine/Troubleshooting.html] (or use the link in *User Tips* at the top of the +Time Machine+ forum).
    Message was edited by: Pondini
    I'm doing the deletion through Time Machine (I go into Time Machine, find the folder in the backup, and ask Time machine to delete all backups of that folder).
    I did find the tip of unmounting the disk, rebooting, and remounting it. That Stopped messages about the disk being read only. However, the folder still doesn't delete. I'm also a bit worried about these being symptoms of some other problem...
    Message was edited by: davidpsummers

Maybe you are looking for

  • Moving iPhone backup folder to different computer

    I would like to sync my iPhone 4 to my MacPro tower rather than sync it to my MacBook Pro. I was wondering if its as simple as just putting the users>my account> Library> Mobile Sync folder onto my MacPro Tower. Any advice would be greatly appreciate

  • Ever since the last update Firefox crashes every time I try to open it. How do I fix this?

    It opens, attempts to connect and then crashes and I get a Crash Reporter.

  • Frame 12 install options question

    In the Frame 12 install, a box comes up with Options: -Adobe Framemaker 12  1.3 GB On the side panel is a tick box with Adobe Framemaker and then indented under that is Adobe PDF Creation Add-On XI 156 MB -Adobe ExtendScript Toolkit CC Here are my qu

  • Data Model Extension

    Hi Techies, Could you please look at the below scenario and provide your valuable inputs. Scenario: I am trying to load the Cost Centers from ECC to MDG via MDMGX t code. The CR is not being created and data is not being loaded to the MDG Cost center

  • Import Bookmarks from HTML

    I am trying to import a Safari bookmarks.html file into Firefox. Your support page says go to "Bookmarks" select "Show All Bookmarks" and select "Import". Please be advised that there is NO "Import" listing under "Show All Bookmarks"! I am using a Ma