Object isn't marked dirty!

Hello,
I have a problem with KODO 2.4.3 also with KODO 2.4.1:
a object, which is changed in the programm is not marked dirty by the
PersistenceManager!!
My code is:
customer=customerByIdent(ident); // Retrieve Customer from
PersistenceManager
customer.setHandle(handle);
customer.setStatus(DomainConstants.READY);
log4j.debug("CustomerHandle changed to " + handle);
System.out.println("UPDATE, Object dirty? "
+ ((javax.jdo.spi.PersistenceCapable)o).jdoIsDirty());
persistenceManager().startTransaction();
persistenceManager().makePersistent(customer);
persistenceManager().commitTransaction();
And it says:
CustomerHandle changed to DE-4982-2
UPDATE, Object dirty? false
How can this happen?? In other places of the app everything is working
fine!!
Thanks a lot
BERND

a section of my jdo.properties file is
javax.jdo.option.RetainValues=true
javax.jdo.option.RestoreValues=true
javax.jdo.option.Optimistic=true
javax.jdo.option.NontransactionalWrite=true
javax.jdo.option.NontransactionalRead=true
And so the changes should be persited also outside a Transaction! But this
did not happen! Why??
Thanks a lot
BERND
Stephen Kim wrote:
You should first be making changes when you are inside a transaction...
and calling makePersistent means nothing as the object is already
persistent.
Also, note the proper methods to probe dirty state is via
JDOHelper.isDirty ().
What are your javax.jdo.NonTransactionalWrite and
javax.jdo.option.RetainValues options?
Bernd Ruecker wrote:
Hello,
I have a problem with KODO 2.4.3 also with KODO 2.4.1:
a object, which is changed in the programm is not marked dirty by the
PersistenceManager!!
My code is:
customer=customerByIdent(ident); // Retrieve Customer from
PersistenceManager
customer.setHandle(handle);
customer.setStatus(DomainConstants.READY);
log4j.debug("CustomerHandle changed to " + handle);
System.out.println("UPDATE, Object dirty? "
+ ((javax.jdo.spi.PersistenceCapable)o).jdoIsDirty());
persistenceManager().startTransaction();
persistenceManager().makePersistent(customer);
persistenceManager().commitTransaction();
And it says:
CustomerHandle changed to DE-4982-2
UPDATE, Object dirty? false
How can this happen?? In other places of the app everything is working
fine!!
Thanks a lot
BERND
Stephen Kim
[email protected]
SolarMetric, Inc.
http://www.solarmetric.com

Similar Messages

  • Moving selected objects leave distracting marks

    Here's what I mean >> http://tinypic.com/r/o8t1xl/8
    The video above is recorded with Bandicam and with mouse hidden.
    What I did in the video is just moving a black square around with transform controls on. Thing that happens after every stop I do is that the transform control remains even after the object has been moved. Hope you know what I mean.
    Does anyone know how to fix this problem? I think this does not happen to me in CS5.
    Current Setup : Photoshop CC 2014.1
    Acer Aspire 4820g
    Graphics: AMD Radeon HD 6550M (I already disabled the gpu in the performance settings to see if it fixes it but.. no )
    RAM: 8GB (2x 4GB)
    HDD: Seagate Momentus XT 750gb Hybrid SSD/HDD (8GB automated ssd cache)
    CPU: i5-480m cpu 2.66ghz
    OS: Windows 7 SP1 x64
    Any suggestions appreciated.
    Thank You Adobe for an expensive suites over the years

    Hi djbgraphicdesign,
    please try this:
    if (documents.length == 2) {
        // your template should be the active document and one item should be selected (as minimum)
        // a second document should be opened in the "background"
        var template = app.activeDocument;
        var tempSelected = template.selection;
        var anotherDoc = app.documents[1];
        if ( tempSelected.length > 0 ) {
            for ( i = 0; i < tempSelected.length; i++ ) {
                newItem = tempSelected[i].duplicate( anotherDoc, ElementPlacement.PLACEATEND );
            alert (i + " items duplicated");
            //app.activeDocument = anotherDoc;
            } else {
                alert( "Please select one or more art objects in your temp file" );
    Have fun

  • Can't figure out why an object isn't visible - CANNOT RESOLVE SYMBOL

    I have a simple 3 class app, all in the same package. Classes are:
    - BjackServlet, BjackDAO, and Player
    I get the compile error (I'm using Ant):
    [javac] C:\Tomcat4118\src\webapps\hellobjack\src\mybjpack\BjackServlet.java
    59: cannot resolve symbol
    [javac] symbol : variable thePlayer
    [javac] location: class mybjpack.BjackServlet
    [javac] String gp = thePlayer.getPassword();
    The pertinent code from the 3 classes is below. The offending code is in bold. Why can't I see the object from the BjackServlet.doGet() method? I can see it from within BjackDAO.addPlayer() after the "thePlayer" object has been instantiated. Please help...thanks in advance!
    package mybjpack;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.lang.*;
    public class BjackServlet extends HttpServlet {
         private BjackDAO theBlackjackDAO;
         public void init() throws ServletException {
              String driver = "com.microsoft.jdbc.sqlserver.SQLServerDriver";
              String dbUrl = "jdbc:microsoft:sqlserver://localhost:1433";
              String dbuserid = "testlogin";
              String dbpass = "1climb1";
              String dbname = "ejh_blackjack1";
              String connectstring = "jdbc:microsoft:sqlserver://localhost:1433;User=testlogin;Password=1climb1;DatabaseName=ejh_blackjack1";
         try {
           theBlackjackDAO = new BjackDAO(driver, dbUrl, dbuserid, dbpass, dbname, connectstring);
         catch (IOException exc) {
              System.err.println(exc.toString());
         catch (ClassNotFoundException cnf) {
              System.err.println(cnf.toString());
         catch (SQLException seq) {
              System.err.println(seq.toString());
      public void doPost(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
        doGet(request, response);
      public void doGet(HttpServletRequest request, HttpServletResponse response)
                throws ServletException, IOException {
         String command = request.getParameter("command");
         if (command == null || (command.equals("stats"))) { //player wants to go to stats page
         else if (command.equals("Add")) { //a new player adds himself to the game site
              try {
              theBlackjackDAO.addPlayer(request, response);
              String gp = thePlayer.getPassword();
              System.out.println("the Player.getPassword method yields: " + gp);
              catch (Exception exc) {
                   System.err.println(exc.toString());
         else if (command.equals("enter")) { //an experienced player enters via index.html
         else if (command.equals("play")) {
    etc...
    package mybjpack;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.lang.*;
    public class BjackDAO {
         private Connection myConn;
         public Player thePlayer;
         public BjackDAO(String driver, String dbUrl, String dbuserid, String dbpass, String dbname, String connectstring)
                   throws IOException, ClassNotFoundException, SQLException {
              System.out.println("Loading driver: " + driver);
              Class.forName(driver);
              System.out.println("Connection to: " + dbUrl);
              myConn = DriverManager.getConnection(connectstring);
              System.out.println("Connection successful! Database is " + dbname);
         public void addPlayer(HttpServletRequest request, HttpServletResponse response)
                   throws IOException, SQLException, NumberFormatException {
              //* read all the form values ...
              String ppass = request.getParameter("formpass");
              String puser = request.getParameter("formuser");
              int ppile = Integer.parseInt(request.getParameter("pile"));
              int pstatus = 1;
              int pbet = Integer.parseInt(request.getParameter("bet"));
              int paccount = Integer.parseInt(request.getParameter("account"));
              //* and write them to player object instance variables
              System.out.println("Player instantiation beginning...");
              Player thePlayer = new Player(pstatus, ppile, pbet, puser, paccount, ppass);
              String insertSql =
                   "INSERT INTO tbl_player (user_id, psswrd, account, default_pile, default_bet) "
                   + "VALUES ('" + puser + "', '" + ppass + "', '" + paccount + "', "
                   + "'" + ppile + "', '" + pbet + "')";
                   Statement myStmt = myConn.createStatement();
                   myStmt.execute(insertSql);
                   myStmt.close();
              return;
    package mybjpack;
    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.lang.*;
    public class Player implements java.io.Serializable {
         private String ouser;
         public String opass;
         private int opile;
         private int oaccount;
         private int obet;
         private int ostatus;
         public Player(int theStatus, int thePile, int theBet,
                             String theUser, int theAccount, String thePass) {
              ouser = theUser;
              opass = thePass;
              opile = thePile;
              oaccount = theAccount;
              obet = theBet;
              ostatus = theStatus;
         public String getUser(){
              return ouser;
         public void setUser(String vuser){
              String ouser = vuser;
         public String getPassword(){
              return opass;
         public void setPassword(String vpass){
              String opass = vpass;
         public int getPile(){
              return opile;
         public void setPile(int vpile){
              int opile = vpile;
         public int getBet(){
              return obet;
         public void setBet(int vbet){
              int obet = vbet;
         public int getAccount(){
              return oaccount;
         public void setAccount(int vaccount){
              int oaccount = vaccount;
         public int getStatus(){
              return ostatus;
         public void setStatus(int vstatus){
              int ostatus = vstatus;

    First glance, try this
    String gp = theBlackjackDAO.thePlayer.getPassword();

  • How can i return an object isn't java object from webservice????

    Hi !
    I have a problem in my Project. When i call method return a java object from webservice , it 's too easy. But when i create my own object (ex:ClientRequest.class) , it doesn't work exactly T_T . When i return that object (on client, doesn't have ClientRequest.class) , i cann't access its static variables.
    How can i do it ??
    Please help me !
    Thanks a lot !!!!!
    class ClientRequest {
    public static int i;
    public static String s;
    public ClientRequest() {
    }

    You can use REFCURSOR type for this. In java SQL TYPES this is available too. In your PLSQL use REFCURSOR for that array and then take the same from java code. Look in the servelet programming book for this SQLTYPE and see PLSQL for handling refcursors. We have done this way and it works.

  • ASP Command object isn't closed in DW code?

    Hi,
    I have recently noticed that the Pagefile useage on one of my
    servers runs
    high most of the time. I am wondering if this is due to
    memory leakage from
    the fact that my DW generated code doesn't explicitly close
    the Command
    object in the ASP code.
    Does anyone know if this could be helped by setting the
    Comand object '=
    Nothing' at the end of the script or is there another way.
    I am using DWMX2005 - Classic ASP to a SQL Server 2000 db.
    Thanks.

    Your right I think Ray Wet or Tom Muck Came up with a
    extension to do just
    that, I think Adobe could have included this with the 8.02 up
    date that
    fixed the SQL injection issue. Hope some of this will be
    included in the
    next version.
    Dave
    "Pat Shaw" <[email protected]> wrote in message
    news:[email protected]...
    > Yes, I totally agree, so why doesn't DWMX do this for
    you? I remember in
    > UltraDev1 (for those who can remember back that far),
    the rs was not
    closed
    > at the bottom of the page and this was corrected in UD4
    which was the next
    > version.
    >
    > "Baxter" <baxter(RemoveThe :-)@gtlakes.com> wrote
    in message
    > news:[email protected]...
    > >I have always been under the impression that every
    thing needs to be
    closed
    > > including all objects, Command, CDO etc.
    > > set commandobject=nothing // destroy the command
    object
    > > Including all connections, recoredset's and so on.
    > > Some helpful information
    > >
    http://www.aspfaq.com/params.htm
    > > Dave
    > >
    > >
    > > "Pat Shaw" <[email protected]> wrote in message
    > > news:[email protected]...
    > >> Thanks but this is different. I am talking
    about the Command object.
    > >>
    > >> "Baxter" <baxter(RemoveThe
    :-)@gtlakes.com> wrote in message
    > >> news:[email protected]...
    > >> > Hi! Pat
    > >> > I always add this to the end of my asp
    pages.
    > >> >
    > >> > </body>
    > >> > </html>
    > >> > <%
    > >> > rsYourRecordset.Close()
    > >> > %>
    > >> >
    > >> > Dave
    > >> > "Pat Shaw" <[email protected]> wrote in
    message
    > >> > news:[email protected]...
    > >> >> Hi,
    > >> >>
    > >> >> I have recently noticed that the
    Pagefile useage on one of my
    servers
    > >> >> runs
    > >> >> high most of the time. I am wondering
    if this is due to memory
    leakage
    > >> > from
    > >> >> the fact that my DW generated code
    doesn't explicitly close the
    > >> >> Command
    > >> >> object in the ASP code.
    > >> >>
    > >> >> Does anyone know if this could be
    helped by setting the Comand
    object
    > > '=
    > >> >> Nothing' at the end of the script or
    is there another way.
    > >> >>
    > >> >> I am using DWMX2005 - Classic ASP to a
    SQL Server 2000 db.
    > >> >>
    > >> >> Thanks.
    > >> >>
    > >> >>
    > >> >
    > >> >
    > >>
    > >>
    > >
    > >
    >
    >

  • Acrobat DC edit object tool, in previous versions used this to delete objects as crop marks

    Now in Acrobat DC I can't select crop marks as a whole

    Hi colobaron1,
    Could you please specify what exactly do you mean by saying 'select crop marks as a whole'.
    Please elaborate more on the same.
    regards,
    Anubha

  • Flash object isn't behaving in FF

    Hello again all
    Got yet another problem - thought I'd got it cracked but no,
    not happening.
    Please have a look at
    http://wharfstudio.thecolourfactor.co.uk/wedding/gallery.html.
    It's not
    playing nicely in Firefox - why???
    Please please can someone help me with this - client of the
    guy I'm doing
    this for has to look at this tomorrow and I left it a bit
    late....
    It's working just lovely in IE :o(
    Course I could just tell him to make sure the client looks at
    it on a PC
    with IE, not FF and not on a MAC with IE5.2...
    By the way, my previous post regarding this page
    http://wharfstudio.thecolourfactor.co.uk/wharf.html
    is still floating in the
    ether...but it's not so serious, can wait a bit.
    I really help with the wedding page though....:o)
    Cheers
    Judi

    Okay - I think it's the wmode=transparent thing - or at least
    that's what
    people are saying [did a search on Google] - I'll give it a
    bash tomorrow
    morning - must crash now,very tired :o)
    Cheers
    Judi
    "Judith Kruger" <jak***@****.co.uk> wrote in message
    news:ecamvv$at5$[email protected]..
    > Hello again all
    >
    > Got yet another problem - thought I'd got it cracked but
    no, not
    > happening.
    >
    > Please have a look at
    >
    http://wharfstudio.thecolourfactor.co.uk/wedding/gallery.html.
    It's not
    > playing nicely in Firefox - why???
    >
    > Please please can someone help me with this - client of
    the guy I'm doing
    > this for has to look at this tomorrow and I left it a
    bit late....
    >
    > It's working just lovely in IE :o(
    >
    > Course I could just tell him to make sure the client
    looks at it on a PC
    > with IE, not FF and not on a MAC with IE5.2...
    >
    > By the way, my previous post regarding this page
    >
    http://wharfstudio.thecolourfactor.co.uk/wharf.html
    is still floating in
    > the ether...but it's not so serious, can wait a bit.
    >
    > I really help with the wedding page though....:o)
    >
    > Cheers
    > Judi
    >
    >

  • Determine if Object is Marked For Deletion

    Hello,
    How can I determine if an object is marked for deletion in a UnitOfWork? Is there a UnitOfWork method I can use to determine this?
    I am querying for an object that may have been deleted in the current UnitOfWork. I am trying to avoid conforming the results of the query so I can avoid hitting the database, but I must make sure I don't find objects that are marked for deletion.
    Any suggestions are appreciated.

    The UnitOfWork interface currently lacks a method available on the concrete implementation. The UnitOfWork.isObjectDeleted(object) will return true if the object has been passed into UnitOfWork.deleteObject(object). It will not include objects that are being automatically deleted at commit due to them being removed from privately-owned relationships.
    For 9.0.4.x I would have to recommend using:
    ((oracle.toplink.publicinterface.UnitOfWork) uow).isObjectDeleted(empWC)
    Beyond 9.0.4 we will have this method added to the interface so that you will not need to cast to the implementation class.
    Doug

  • Distributed Cache - large objects

    Hi,
    I have a need to store a large collection of object associated with one key in the cache. And updates to the cache will happen with one of the object in the collection.
    How does coherence handle the sync b/w the distributed cache -- will it be like the whole collection marked dirty and synched again or just the bits that got changed. Ours is a perf intensive application so would like to know the implications of the same.
    Thanks in advance for your suggestions.
    - Anand

    Hi Anand,
    You can use InvocableMap (also see Provide a Data Grid for this - a very simple example is attached.
    Regards,
    Dimitri<br><br> <b> Attachment: </b><br>Main.java <br> (*To use this attachment you will need to rename 295.bin to Main.java after the download is complete.)

  • Mark InfoObject authorization relevant

    Dear Community,
    we've activated "authorization relevance" in one of our frequently used InfoObject and added it to an authorization object.
    We've the situation that the field information of this InfoObject disappears in reports.
    (The authorization object is nowhere marked as relevant for a DataProvider)
    Am I right that this isn't an expected bw system behavior??!
    Thx for some tips or remarks in advance.
    br, michael

    Sounds very peculiar...
    Did you add the authorization object to any roles? Did you specify any restrictions on values?
    For an overview of how we chose to implement security, see the following thread:
    Re: Auth Relevancy Not Working
    Hope this helps...
    Bob

  • Question about handing classes in Objective-C

    Greetings -- I'm pretty new to Objective-C. I do have a few apps out in the app store, but they were simple one-form apps where I was able to dump everything into the main class and be happy with it.
    This new project I'm working on, is huge in comparison. Over 25 views, accessible through TableView driven menus.
    I was able to get all of the menus working, each launching a separate view NIB file (so far, just a label to show me that it's done, but I got that part working.)
    Now what I'm trying to do, is add a "click" sound when a row is selected. But I'm wanting to do this in a separate class, so each .m file can instantiate it's own version of the logic instead of having the same code 29 times.
    So, this is what I've done:
    Click.h
    #import <Foundation/Foundation.h>
    #import <AudioToolbox/AudioToolbox.h>
    @interface Click : NSObject
    SystemSoundID soundID;
    -(void) playClick;
    @end
    Click.m
    #import "Click.h"
    @implementation Click
    -(id) init
    self = [super init];
    NSString *path = [[NSBundle mainBundle] pathForResource:@"click" ofType:@"wav"];
    AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID);
    return self;
    -(void) playClick
    AudioServicesPlaySystemSound (soundID);
    @end
    RootViewController.h
    #import <UIKit/UIKit.h>
    #import "Click.h"
    @interface RootViewController : UITableViewController <UITableViewDelegate, UITableViewDataSource>
    NSArray *controllers;
    Click *clicker;
    @property (nonatomic, retain) NSArray *controllers;
    @property (nonatomic, retain) Click *clicker;
    @end
    RootViewController.m
    #import "RootViewController.h"
    @implementation RootViewController
    @synthesize controllers, clicker;
    - (void)viewDidLoad
    Click *newClicker = [[Click alloc] init];
    clicker = newClicker;
    [newClicker release];
    self.title = @"Main Menu";
    - (void)dealloc {
    [controllers release];
    [clicker release];
    [super dealloc];
    #pragma mark Table View Delegate Methods
    -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
    [clicker playClick];
    I cut out the code pieces regarding the TableView that I know works, and tried showing only the parts that I've added to make the sound.
    What I've tried, is when the RootViewController is created, it has a SystemSoundID type variable defined with it named clicker. Then as part of "viewDidLoad", instantiate an instance of the class and have it automatically populate the variable "soundID". Then during "didSelectRowAtIndexPath", I want the "playClick" method of "clicker" to be run, but at this point the app seems to get caught in some sort of perma-loop, and I have to "STOP"/"Home" out of it.
    I'm hoping the problem is my rookie-status at using Objective-C objects, and the solution jumps out at you veterans, and then whatever problem I am having won't be duplicated when I create additional classes that I'd want to merge into my ViewController logic.
    Hope I've made everything clear. If anyone has questions, I'll be checking for replies
    Thanks.

    Dragon's Nest wrote:
    Is it preferred to init a copy and assign it like you did above?
    Yes, it's an accepted pattern which you'll see in most of the sample apps. Asnor's code works just as well in this case, and it might always work for you if you stick to that same pattern. However if you were working on a team and everyone else used the more common pattern it might cause a problem. For example, this code would cause a memory leak:
    @property (nonatomic, retain) Click *clicker; // interface
    self.clicker = [[Click alloc] init]; // implementation
    The above is the flip side of your original code. In this case, because we're not releasing the newly alloced object, its retain count is +2 after the setter retains it.
    There are other advantages to the accepted pattern. Suppose you weren't assigning the new object to an ivar but only using the object in that one block of code. Should you then release it? Yes. Will you remember? Well, if you're using the pattern, you'll always release it. If you always release the local pointer regardless of whether it gets retained elsewhere, you're much less likely to have a memory leak. How bout the case where you return the pointer (i.e. alloc an object and return it's address from that method)? In that case you just autorelease it. So whoever called the method needs to retain the returned object if it needs to be used after the current event cycle.
    Either way, immediate release or autorelease, you're always releasing an alloced object in the same block of code.
    Memory management can easily get out of control without following consistent patterns. Alloc->retainBySetter->release is the accepted pattern for Cocoa. Your original code meant to use the correct pattern, but you just forgot that clicker=object isn't the same as self.clicker=object because the latter retains the object. Once you've consistently used the correct pattern for awhile, you'll almost never make that mistake.
    Also, is there any difference in calling it in the following two ways:
    @property (nonatomic, retain) Click *clicker; // <-- must be considered to answer this question
    @synthesize clicker;
    [clicker playClick];
    [self.clicker playClick];
    In the above case there's no difference since the getter synthesized for that property declaration will simply return the value of the ivar (i.e. the address of the retained Clicker object). But in the general case, there certainly could be a difference. If the property was atomic, for example, the results could be different. Of course there will definitely be a difference if you wrote a custom getter that did something more than the default.
    Is there a rule or convention re when to use the getter and when to use the ivar directly? Not that I know of. I think you just need to be aware of what the getter does when deciding whether to use the dot notation. This is a point you might want to research a little more, though. Maybe someone here with more experience in Obj-C or Cocoa will comment.
    In fact a few of the experts in this forum advise against ever using dot notation. They feel it was invented to crash newbie programs. If you never use dot notation the difference between these two lines is much easier to see:
    clicker = newClicker;
    [self setClicker:newClicker];
    But once again, if you stick to the same pattern all the time, it's much harder to make a mistake.
    - Ray

  • This is a test of mark as question from Spell Check.

    This is marked as a question in the main form. I will go to spell check and submit from there. If it isn't marked as a question it is because that setting doesn't persist to the spell check form and subsequent submittal. If that is the case how do we get that fixed?

    Hi Doug,
    Yes it is. The workaround is that one can go into the post and set the flag again.
    I know this is not great, but works until we find the time to change it.
    Best, Mark.

  • DAO and Domain Object

    hi,
    Normally when i want to persist a domain object like Customer object to a database, my statements will be below,
    // code from my facade
    Customer cust = new Customer();
    cust.setFirstName("myname");
    cust.setLastName("mylastname");
    // set another attributes
    cust.create();
    with this code i have a CustomerPersistence object to handler for create this customer record to a database. Now j2ee have a DAO pattern. So my question is,
    1.where is a domain object within DAO pattern? --> because of we can reused domain object.
    2.DTO is Domain Object, isn't it?
    3.when i look at some articles about DAO, many of it will present in this way
    facade -->create DTO --> call DAO (plus something about factory pattern)
    i never see something like this
    facade --> domain object --> dao
    any suggestion?
    anurakth
    sorry for my english!!

    Hi,
    I am a bit confused about implementation of the domain model and I wondered if you could help. My main concern is that I am introducing too many layers and data holders into the mix. Here is what I am thinking.
    DTO - used to carry data between the presentation and the services layer
    Service Class - coordinates the calling of domain objects
    Domain Object - models a domain entity, service layer logic specific to this object is to be implemented here.
    Data Object - an exact representation of a database table. many to many relationship between domain object and data object.
    Hibernate DAO Class - has no properties, just methods used for read and writing the object to the database. It is passed in the Data Object for persistence. Is it wrong that the DAO contains no properties?
    Perhaps the domain object will contain each data object it is comprised of. I was originally going to keep calls to DAOs in the Services class (as recommended in http://jroller.com/page/egervari/20050109#how_to_change_services_logic ) but I am thinking that each domain object could expose a save method, and that method would co-ordinate persisting itself to the various tables it is derived from.
    Does this sound resonable? I have trouble finding a pattern on the net that clealy defines the Domain Model. I was tempted to map Domain Objects directly to database tables, and simply persist the Domain Object, but this 1-1 relationship may not always hold true.
    Thanks.

  • Adobe Illustrator CC 2014 - Custom Crop Marks?

    Hello all,
    I've been looking for a solution to this problem for some time now, and am hoping to find help here!!
    Adobe Illustrator CC 2014 - want to be able to customize how crop marks are created through Object>Create Trim Marks.  Does anyone know of any plugins that could achieve this?  Manually shrinking and shifting the crop marks takes too much time...
    Thanks in advance to any contributors!

    I know of no plugins for this.
    The fastest way we found was to use Libraries.
    1. Make one set of trim marks and save it in the library.
    2. On a new document, make a box the trim size of your doc.
    3. Snap guides to the 4 edges of the box.
    4. Drag out the crop marks (double, triple, with registration marks, or whatever you created in your original Library item).
    5. Snap each of four mark sets to the guide corners.
    Voila.

  • Script to align selected objects to artboard

    Hello, I was wondering if anyone had a simple solution to aligning selected items to the artboard. I was going to create an action but then realized it would be more convenient for me to include it in my script file....I have a script to align objects with each other but they dont align to the artboard. Any suggestions?

    Hello volocitygraphics,
    here is a quick&dirty solution.
    Note that the result may be different, if clipping masks are exists in the document.
    Please test it at first on copies of your documents. Use it on your own risk.
    // ArtboardCenterAroundSelectedPaths.jsx
    // works with CS5
    // http://forums.adobe.com/thread/1336506?tstart=0
    // (title: script to align selected objects to artboard)
    // quick & dirty, all selected items will be centered at the active artboard 
    // (include clipping paths  !visible result can be different)
    // regards pixxxelschubser  19.Nov. 2013
    var aDoc = app.activeDocument;
    var Sel = aDoc.selection;
    if (Sel.length >0 ) {
        var abIdx = aDoc.artboards.getActiveArtboardIndex();
        var actAbBds = aDoc.artboards[abIdx].artboardRect;
        var vBounds = Sel[0].visibleBounds;
        vBounds_Li = vBounds[0];
        vBounds_Ob = vBounds[1];
        vBounds_Re = vBounds[2];
        vBounds_Un = vBounds[3];
    if (Sel.length >1 ) {   
        for (i=1; i<Sel.length ; i++) {
            vBdsI = Sel[i].visibleBounds;
            if( vBounds_Li > vBdsI[0] ) {vBounds_Li = vBdsI[0]};
            if( vBounds_Ob < vBdsI[1] ) {vBounds_Ob = vBdsI[1]};
            if( vBounds_Re < vBdsI[2] ) {vBounds_Re = vBdsI[2]};
            if( vBounds_Un > vBdsI[3] ) {vBounds_Un = vBdsI[3]};
        aDoc.artboards[abIdx].artboardRect = [vBounds_Li +((vBounds_Re - vBounds_Li)/2-(actAbBds[2]-actAbBds[0])/2), vBounds_Ob -((vBounds_Ob - vBounds_Un)/2+(actAbBds[3]-actAbBds[1])/2), vBounds_Li +((vBounds_Re - vBounds_Li)/2-(actAbBds[2]-actAbBds[0])/2)+(actAbBds[2]-actAbBds[0]), vBounds_Ob -((vBounds_Ob - vBounds_Un)/2+(actAbBds[3]-actAbBds[1])/2)+(actAbBds[3]-actAbBds[1])];
        } else {
            alert ("No selection");
    I hope so, the document coordinatesystem is the same as in CS6+
    Have fun

Maybe you are looking for