-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Unexpected Database Commit
PostPosted: Mon Feb 02, 2009 12:31 pm 
Newbie

Joined: Mon Feb 02, 2009 12:18 pm
Posts: 1
In a webservice call to valid email settings, which is purely to take the settings passed in the DTO to use to attempt a connection to the email server and return a true/false, the following scenario is occurring…

If I make the webservice call and include the IDs in the DTOs, the settings are being committed to the DB. If I make the exact same call and do NOT include the IDs in the DTOs, the settings are being used for the validate call but are NOT being saved in the DB, which is the desired behavior.

Do you have any idea why passing in those IDs would trigger a DB save/update when there is no explicity DAO save/update method being called? The commit seems to be happening in the TransactionInterceptor (according to my debugger).

The code from the webservice is below....

Code:
   
    /** {@inheritDoc} */
    public String validateEmailSettings(final SysPropertyDTO... dtos) {
        try {
            SysProperty[] sysProperties = this.sysPropertyAssembler.bindToDomainObjects(dtos);
            return (this.sysPropertyManager.validateEmailSettings(sysProperties));   
        } catch (final Exception e) {
            return ("Invalid settings " + e.getMessage());
        }
    }


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.