Question when sharing the Grails Libraries in an app server

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question when sharing the Grails Libraries in an app server

bbqMike
I asked this question almost 2 years ago and got no answer.  We then went a different direction so I didn't investigate it further myself.  Figure I should throw it out there again and see if anyone has any insight now since we're considering it again.

To cut down on the size of War files we deploy we are considering using the nojars option in Grails.  WebSphere offers a concept called 'Shared Libraries' where we can put all of the Grails jar files and share them with any of the grails applications on the server.  We've done this with some simple test apps and it definitely succeeds at keeping the war files small and they seem to function properly.  

Based on what I'm told, a single classloader is used to load and cache the libraries and it is shared across all the grails apps that we associate to the shared library.  I am concerned that deep down in the Grails/Hibernate/Spring code we might cause some unintended [bad] behavior such as having persistence session corruption, property collisions, etc because of having multiple grails apps sharing the classes/classloader with each other.  

Anyone with deep knowledge of how Grails works inside have any thoughts on whether this will be a problem?
Reply | Threaded
Open this post in threaded view
|

Re: Question when sharing the Grails Libraries in an app server

jstell
2 years ago, with Grails 1.x, sharing grails libs wasn't really an option. However, the Grails team has made long strides to support this in Grails 2. For instance, several static "holder" classes have been deprecated for this very reason.

I don't see any reason why you shouldn't be able to share Grails libraries now, as long as you follow Grails 2 conventions.

Jason

On Wed, May 23, 2012 at 2:01 PM, bbqMike <[hidden email]> wrote:
I asked this question almost 2 years ago and got no answer.  We then went a
different direction so I didn't investigate it further myself.  Figure I
should throw it out there again and see if anyone has any insight now since
we're considering it again.

To cut down on the size of War files we deploy we are considering using the
nojars option in Grails.  WebSphere offers a concept called 'Shared
Libraries' where we can put all of the Grails jar files and share them with
any of the grails applications on the server.  We've done this with some
simple test apps and it definitely succeeds at keeping the war files small
and they seem to function properly.

Based on what I'm told, a single classloader is used to load and cache the
libraries and it is shared across all the grails apps that we associate to
the shared library.  I am concerned that deep down in the
Grails/Hibernate/Spring code we might cause some unintended [bad] behavior
such as having persistence session corruption, property collisions, etc
because of having multiple grails apps sharing the classes/classloader with
each other.

Anyone with deep knowledge of how Grails works inside have any thoughts on
whether this will be a problem?

--
View this message in context: http://grails.1312388.n4.nabble.com/Question-when-sharing-the-Grails-Libraries-in-an-app-server-tp4628895.html
Sent from the Grails - user mailing list archive at Nabble.com.

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

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Question when sharing the Grails Libraries in an app server

Ian Roberts
On 23/05/2012 20:21, Jason Stell wrote:
> 2 years ago, with Grails 1.x, sharing grails libs wasn't really an
> option. However, the Grails team has made long strides to support this
> in Grails 2. For instance, several static "holder" classes have been
> deprecated for this very reason.
>
> I don't see any reason why you shouldn't be able to share Grails
> libraries now, as long as you follow Grails 2 conventions.

... and as long as all the plugins you need to use also follow
conventions and don't themselves use the static holders.  That's the
difficult bit.

Ian

--
Ian Roberts               | Department of Computer Science
[hidden email]  | University of Sheffield, UK

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

    http://xircles.codehaus.org/manage_email