Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Spring Integration

Suneet Shah

2010-03-08

Replies: Find Java Web Hosting

Author LoginPost Reply
Hello:

I have an app that is built using spring and spring mvc version 2.5.
From this app we integrate with groovy scripts using the
GroovyScriptEngine.
In a few of these scripts, I have a need to call methods on POJOs that
are part of the spring application. When I do this, it appears as though
the spring famework is being re-initialized and all the mapping objects
are being reloaded
This is causing memory issues for me. How can I work around this? Is
there a way to not have to initialize spring just do it once and have it
used by all the scripts?

thanks for your help

import org.springframework.context.support.ClassPathXmlApplicationContext

def context = new ClassPathXmlApplicationContext("applicationContext.xml")
def loginManager = context.getBean("loginManager")

while ( loginManager.loginExists( "USR_SEC_DOMAIN", loginID, sysId )) {
strCtrSize = String.valueOf(ctr)
....
}

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.