Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Silly Question on Spring and Hibernate DMI

    I am trying to understand why there is a need of a testFileName on the DMI datasource that uses spring/hibernate integration over DMI.

    My basic question is

    <DataSource
    ID="supplyItemSpringDMI"
    serverType="generic"
    testFileName="supplyItem.data.xml"

    What is the purpose of the param testFileName="supplyItem.data.xml"

    If the data being loaded comes from hibernate?

    Is this for offline support of some kind?

    BTW, I am new here, wish you guys all best and starting to use the EE trial to make sure it meets my needs.

    Cheers,

    EJ

    #2
    The testFileName is used solely for the "Import" functionality in the Admin Console, which allows you to import starter data into the DataSource (or reset the DataSource to particular test data).

    Comment


      #3
      Wow, that was a fast reply!

      Thanks a lot, so I will omit it for my purposes.

      If I understood well, using the EE datasources I can basically have a direct wire between my JPA / Spring DAO connection and all changes reflected in a ListGrid for instance would be persisted back into the persistence layer?

      So basically it allows me to perform direct manipulation of data and reflect those changes back into my Object / Persistence model?

      Cheers,

      EJ

      Comment


        #4
        Yes, that's basically correct - however, the QuickStart Guide provides a deeper overview of this and you should definitely read it before settling on a strategy.

        In particular, note that the particular sample you're looking at is really for people who have both a pre-existing JPA/Hibernate layer and pre-existing business logic on top, already implemented. If you don't have these layers yet, you can enable CRUD with no server-side code required at all - see this sample. Then you can add business logic via DMI as needed.

        Comment


          #5
          Agan, thanks a lot for the prompt feedback.

          I've been reading the quick start guide and I am impressed with the functionalities.

          My Service and Persistence Layer, are tied together using spring autowire and JPA, on the other point there is a Hibernate JPA implementation.

          The main goal here is that I am planning to scale this solution once it is reaching the mature state, so most of the service and persistence layer will be located in a cluster of JBoss servers.

          My main concern is that I could be able to use either a round robin call from server to server to load balance requests. Perhaps there is a connector or datasource just doing this.

          I am also using data replication, basically a master db and maybe 3-4 replicas of mysql would do the job.

          I am also planning on using a storage system such as S3 from Amazon or Google Storage to attend the replication of data upload and static files storage.

          The concept is to host 2 clusters of SmartGWT and 3-4 clusters of Jboss and 3-4 instances of mysql.

          Having a pluggable interface is the way to go.

          Cheers,

          EJ

          Comment


            #6
            Basically, all of the different approaches you could take here (SQLDataSource, JPA/HibernateDataSource, or writing DMIs to call existing logic) all satisfy this deployment architecture. It's just a matter of which one has you writing the least code.

            We would recommend that anywhere that you do not have extensive pre-existing code, you use the built-in DataSource connectors, since they implement transactional CRUD including high-performance, paged filtering of data with advanced search criteria across multiple entities.

            Then your DMIs will consist only of business logic, rather than a re-implementation of all of the above.

            Comment


              #7
              Hello,

              I've been trying to run a sample code here to populate a grid and it seems to do not work.

              After several times trying I was able to get the following message

              03:00:50.572 [ERROR] [sampleApp] 03:00:50.569:MUP6:WARN:DataSource:consultPeople:Attempt to perform iscServer request requires options SmartClient server support

              I am running this on GWT hosted mode, similar sample code using hsqldb works, but not this one with mySQL.

              Please let me know if I need to pack it as a war file.

              Cheers,

              EJ

              Comment


                #8
                This indicates your <inherits> are wr ong in your .gwt.XML file - see the inherits in the installation instructions.

                Comment


                  #9
                  With version 2.4 I tried to use test-data from a xml file. I am using a sql-datasource definition in xml format.
                  The testFileName is set, also clientOnly="true" in the datasource xml definition file.

                  Is there still a configuration missing, or do I have to change my page code, where the ds is connected to a grid?

                  Do I have to run a database to use clientOnly mode?

                  The path to use the tools is wrong in the documentations. Should be <inherits name='com.smartgwtee.tools.Tools'/>
                  Last edited by holger; 20 Feb 2011, 04:24.

                  Comment

                  Working...
                  X