JGrinder's undocumented features

2002-10-06
2013-04-17
  • Ferdous Khan

    Ferdous Khan - 2002-10-06

    Hi, I have found JGrinder very useful and easy. But not all features are reflcted in the tutorial. So, my query is:

    1) In what circumstance "setAsTransient" is useful ? I mean, why do I need some domain objects not to participate in transaction ?

    2) Does JGrinder use any connection pooling (e.g. poolman) technology ?

    3) Is it good for banking solution ? Can you name of the areas (requires huge transaction) where it is performing good enough ?

    Thanks in advance.

    Regards,

    Ferdous Khan

     
    • Ashik Uzzaman

      Ashik Uzzaman - 2002-10-07

      Mr. Ferdous,

      I am new to JGrinder. I found the tutorials not useful enough due to wrong codes. So far I could not find any connection pooling mechanism in it though it should be ideally present here. I am alternately planning for OJB from apache. Would you like to have some comment in this regard, specially the facilities JGrinder provides despite its less community support now?

      M. Ashikuzzaman

       
    • David Hoag

      David Hoag - 2002-10-07

      The tutorial is old - I hear some of the other contributors are updating it as I write.

      The best way to get started is with the following documents in the "docs" section of this website.

      http://sourceforge.net/docman/?group_id=1531

      1) setAsTransient is typically used when you want to use a persistent object for non-persistent purposes. Query by example is a common one.  If you don't use setAsTransient, the SQLQuery will still work, by calling setAsTransient itself.
      Another situation is one you want to update many fields. JGrinder tracks changes to objects, and this introduces overhead. If you wish to gain performance you can setAsTransient before doing updates. Just be sure to setAsTransient(false) when you're done (and domainObject.insert()  to make it a part of the current transaction)

      2. It uses connection pooling. See RDBConnectionPool for details. Basically it allocates connections based upon need (with a configurable limit).

      3. I know of a LARGE trading exchange that is using it as the foundation of their electronic trading support.  To judge the performance on your hardware there is some code in the testSrc/performance directory of the persistence module.  Here you can tweak configurtions to see the effect it would have in your environment. You'll need tables to support the TestEntity and TestPerson found in the same directory.

      If you find undocumented features usefull, feel free to post a new doc to the docs section of this site. I'll just about make anything public.

      Thanks

       
    • Ferdous Khan

      Ferdous Khan - 2002-10-07

      David Hoag,
        thanks, that proves support is not over :).

      Ashik,
        I primarily choose JGrinder because I found it easy. To run the tutorial, you will need to edit the source code of JGrinder and recompile it (I think, it was "SQLSelect.java" where you have to replace "buf.append(columnListBuffer)" with "buf.append((Object) columnListBuffer)" in the method "formatSelectList"). I developed a small prototype of "user-priviledge" (many-many relationship) with JGrinder and it is working well :).
      I generate my primay key without the default one by not calling getSuperDescriptor (look at the DomainObject.java source).

      You can always add your own version of connection pooling mechanism into JGrinder as it is open source; unless you are expecting an "everything-is-done" tool !

      Regards,

      Ferdous Khan

       
    • Hoang Nguyen

      Hoang Nguyen - 2009-04-08

      Hi,

      I'm using JGrinder and I feel it's so hard to find its document. I'm having a problem with update a record in database, I just want to generate the fields I want to update, not update all fields because there are some virtual fields in my database so I don't want to add them to update query. Do you have any way to filter out some fields we don't want to update or just define some specific fields in a table, not all fields as default.

      Thanks for your help,
      Hoang

       

Log in to post a comment.