Results 1 to 3 of 3

Thread: Simple Set up help

  1. #1
    Join Date
    Aug 2005
    Posts
    1

    Default Simple Set up help

    Hi there,

    I am very new to Spring. I am having a hard time getting set up just to run a simple JUnit test.

    I am using an Oracle database, TopLink and JUnit.

    I need help with basic configuration (i.e. applicationContext.xml) and information on how to run a test outside of a container/server.

    Is there some site that walks through a basic example of this? In the format of

    1. Define Toplink object
    2. Configure sessions.xml
    3. Configure applicationContext.xml
    4. Define DAO interface
    etc, etc.


    ANY help and information would be greatly appreciated.

    P.S. I have downloaded and looked at the PetClinic sample but it uses HSQ for its database and I am unable to transfer what is done there to what I need to do.

    Many thanks!

  2. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    I haven't used toplink but you can look at the configuration for the petclinic toplink. That should take of the DAO part, for moving to Oracle you have to just change the jdbc driver and URL of the database.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3

    Default

    Sounds like you just need help setting up the PetClinic schema in an Oracle database.

    I'll put together a .sql script that you can run in from sqlplus to create the PetClinic schema in an Oracle database. Just email me at james.x.clark@oracle.com and I'll send it to you.

    After creating the schema, you'll need to make two changes to applicationContext-toplink.xml:

    • datasource bean will need to be pointed at the Oracle Database
      sessionFactory bean will need a different databasePlatform property (for Oracle)


    After that, you should be able to get the PetClinic sample running on Oracle DB (which should provide a good starting point for you to study the structure of the app)

    Also try to take advantage of the Mapping Workbench project provided. This give you a graphical view of how the PetClinic Objects are mapped into the database.

Similar Threads

  1. Problem with Simple RMI Sample
    By con19m32 in forum Remoting
    Replies: 2
    Last Post: Jun 27th, 2007, 12:38 AM
  2. simple question
    By yukster in forum Security
    Replies: 6
    Last Post: Sep 19th, 2005, 07:58 AM
  3. problem running simple aop!
    By khalidhajsaleh in forum AOP
    Replies: 2
    Last Post: Jul 27th, 2005, 01:37 PM
  4. Simple cacheing idea
    By jonmor in forum AOP
    Replies: 3
    Last Post: Feb 5th, 2005, 02:57 AM
  5. Simple ServletEngine
    By Martin Kersten in forum Web
    Replies: 3
    Last Post: Aug 12th, 2004, 05:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •