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

    Where to place *.DS.XML files?

    Hello -

    As a learning exercise, I have been using NetBeans 6.8 on WinXP to locally re-create some of the sample apps from the on-line showcase for the LPGL Edition.

    Now I would like to re-create an app from the showcase for the Enterprise Edition - the Master-Detail (Batch Load & Save) app shown here:

    If I click the 'View Source' in this on-line showcase sample app, it includes two *.DS.XML files for Hibernate:


    I have the following questions:

    (1) Do I hand-code these files, or are they automatically generated?

    (2) If I were to hand-code them (or copy-and-paste them from the 'View Source' section of the on-line showcase sample app into, say, a new NetBeans project), where in the project (or filesystem directory tree) would I place them?

    (3) What additional setup (in Hibernate or SQL) would be necessary in order to re-create this app from the on-line Enterprise Edition showcase? I have MySQL and Postgres servers on my local WinXP machine for development and testing - should I create the data in one of them?

    (Specifically, I can't find the data anywhere in my local evaluation copy of SmartGWT EE, and all links to the EE Showcase go to the on-line one - not to any local EE showcase. It says that I can also deploy the EE Showcase locally which I will do later once I set up a local web container. I do have Jetty set up from another web application development framework - by the way, would it be ok to use Jetty as my local web container for development and testing, or are there some advantages to using other web containers such as TomCat or GlassFish to deploy locally during development and testing?)

    Sorry about all the confusion.

    Thank you.
    Last edited by stefanscottalexx; 24 Feb 2010, 16:12.

    I'm testing SmartGWTEE with glassfish + NB atm so I can tell you a few things about my setup:

    initial setup
    - since NB comes bundled with Glassfish I decided to use that (I also wanted to try out some EJB stuff)
    - install GWT & SMARTGWTEE SDKs somewhere on your hardrive
    - you will need the GWT4NB plugin installed in netbeans
    - start a new Web Project using GWT framework
    - add the SMARTGWT jars to your classpath
    - do a simple test like SC.say("hello") to make sure everything works

    data source stuff
    - copy the file and log4j.isc.config from one of the sample projects somewhere on your classpath for your current project
    - you can use file to setup paths for your datasources, database connectors and other things
    - if you use GlassFish it may be more convenient to create a jdni Data Source in GF Administration and you won't have to change anything in You'll use the GF connection pool rather the SmartGWT one.
    - I'll assume you created a JNDI DS named "jdbc/myDatabase"
    - the ds.xml files can easily be created using DataSource Generator tool. To access this tool, the easiest way is to deploy the showcase.war to GF and run localhost:8080/showcase; then select Tools->DataSource Wizard/Data Source Generator.
    If everyting is ok so far you'll see the "jdbc/myDatabase" DS listed there; Use this tool to generate these files from your database
    - by default *.ds.xml files need to be in web/ds folder in NB project. you can configure this in
    - if you user serverType="sql" setting in you ds.xml files you should be good to go.

    I hope it helps you a little :)