Re: SimpleORM Download Form

Anthony Berglas <[email protected]>
Newsgroups gmane.comp.java.orm.simpleorm
Message-ID <[email protected]>
Hello Bruce,

You have a choice as to whether to have long transactions during user 
think time that use database locks, or short transactions that use 
optimistic locks  -- SimpleORM supports both.  If you have an MVC 
database such as Oracle or PostgreSQL I would lean towards long 
transactions, but in that case be sure to add the SFOR_UPDATE mode so 
that you actually get a lock.

If you do not pessimistically lock, then you commit with detach after 
the read, and then run a second transaction to update.  Optimistic 
lock data is stored with the detached data (unlike Hibernate).  Dont 
try to refresh a SDataSet, just create a new one.

There is no single session dirty event, could add one.  But there is 
onValidateField which is called when any field is modified, and so 
would do what you want.

(I would suggest that you never grey out buttons but rather let the 
use press them and then provide an informative error message.  IMHO 
it is very annoying not being able to press a greyed out button and 
not being able to figure out why.  The classic case is the drawing 
buttons in Excel, which can have about 20 different reasons for being 
greyed out, some of which are completely non-obvious.)

Anthony


At 04:00 PM 22/09/2008, [email protected] wrote:
>name: Bruce Alspaugh, Ph.D.
>
>goodpart: I'm writing a Swing Rich Client that I want to launch 
>using Java Webstart.  I tried Hibernate, but it has so many jar 
>dependencies it makes the download too big.  I also did not like all 
>the configuration I had to do.  So I started over and wrote raw JDBC 
>and DAO's by hand, but that was getting tedious as the number of 
>tables grew larger. I need an ORM tool that has small download size, 
>and solves the N+1 selects problem without all the bytecode 
>enhancement, etc.  My objects must be JavaBeans (not just POJO's) 
>that fire PropertyChangeEvents when they are modified so that 
>binding frameworks like JGoodies Binding, Beansbinding, and Glazed 
>Lists can observe the changes and update the UI as changes are made.
>
>concerns: I could not find a way to receive an event notification 
>that the session is dirty.  I need an event to notify me every time 
>the dirty state changes so I can enable and disable a save button in 
>the client so the user knows if they have unsaved changes.  It's not 
>clear from the whitepaper whether I can set a mode comparable to 
>Hibernate's FlushMode.MANUAL and leave the session open during user 
>think time.  I need to allow the user to make changes to the objects 
>in the open session, and then flush the changes manually when they 
>click "Save" or reload the session when they click 
>"Refresh."  Transactions can be long running because of user think 
>time and it takes awhile to type in their edits.  This means other 
>users could concurrently modify the data.  Not sure the best 
>strategy to handle these sorts of transactions with 
>SimpleORM.  Would also be nice to have a disconnected mode that 
>resyncs with the database when the user is back online for laptop users.
>
>organisation: Compulink, Ltd. (www.compulink-ltd.com)
>
>city: Columbia Missouri
>
>orgdesc: See website:  www.compulink-ltd.com  I am also working on a 
>special project to develop a supply chain management application for 
>a global supplier of topaz gemstones to jewlry manufacturers.
>
>nrprogrammers: 2
>
>howknown: Book reference: "Agile Java Development with Spring, 
>Hibernate, and Eclipse"
>
>comments: This looks to be a very clever and well thought out 
>design.  The best I have seen so far for what I need to do.

Dr Anthony Berglas, [email protected]       Mobile: +61 4 4838 8874
Just because it is possible to push twigs along the ground with ones nose
does not necessarily mean that is the best way to collect firewood.


------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/SimpleORM/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/SimpleORM/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[email protected] 
    mailto:[email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.