Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
Main
TextFormattingRules
WhatIsWiki




JSPWiki v2.2.33

[RSS]


Hide Menu

SandBox


This is version 243. It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]



    protected void setUp() throws Exception {
        // the following is necessary for lazy loading
        sf = (SessionFactoryctx.getBean("sessionFactory");
        // open and bind the session for this test thread.
        Session s = sf.openSession();
            TransactionSynchronizationManager
                .bindResource(sf, new SessionHolder(s));
        
        // setup code here
    }

    protected void tearDown() throws Exception {
        // unbind and close the session.
        SessionHolder holder = (SessionHolder)
                TransactionSynchronizationManager.getResource(sf);
        Session s = holder.getSession();
        s.flush();
        TransactionSynchronizationManager.unbindResource(sf);
        SessionFactoryUtils.closeSessionIfNecessary(s, sf);

        // teardown code here
    }

Attachments:


Go to top   More info...   Attach file...
This particular version was published on 06-Nov-2006 13:52:35 MST by MattRaible.