Alexander Makarov
Alexander Makarov

Reputation: 23

EJB calls from grails to glassfish

I need to use EJB remote calls from my grails application. For this in previouse Servlet application I used client glassfish jar(gf-client.jar) and is's worked.

How I can include gf-client.jar into build path in grails app for call EJB methodth?

thank you.

Upvotes: 0

Views: 696

Answers (2)

Alexander Makarov
Alexander Makarov

Reputation: 23

the answer was to copy all libraries of GlassFish application server to client mashine (directory with gf-client.jar and 2 levels up, check dependencies in gf-client.jar) and add only gf-client.jar to classpath of application. Ather dependencies will loaded automatically, when gf-client will loaded.

note 1: in my case for grails application witch I deploying to tomcat servlet container write full path to gf-client.jar to shared.loader section of catalina.properties file in conf dir, and restart tomcat.

note 2: for GlassFish v3.1 and up, replace gf-client.jar with gf-client-module.jar

Upvotes: 1

Jared
Jared

Reputation: 39883

Put gf-client.jar into the lib directory of your grails app. Any jar files in the lib directory of your grails app will automatically be included when you run your application as well as be packaged in generated war files.

Upvotes: 0

Related Questions