|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
JNDI connection pooling issuesHi,
We are having an issue with the jndi connection in our application. The
application is running on websphere app server and connecting to oracle
database. We configured a connection pool in websphere and tried connecting to
it. After four or five transactions the application is running out of
connections. I have kept the connection pool size as 10 in the development
environment. The problem I can see here is that the grails container is not
returning the connection to the websphere. Any help is appreciated Thanks Shyam |
|
|
Re: JNDI connection pooling issuesOn 01/05/2008, at 12:35 AM, Alapati, Shyam Kishore wrote: > We are having an issue with the jndi connection in our application. > The application is running on websphere app server and connecting > to oracle database. We configured a connection pool in websphere > and tried connecting to it. After four or five transactions the > application is running out of connections. I have kept the > connection pool size as 10 in the development environment. The > problem I can see here is that the grails container is not > returning the connection to the websphere. Any help is appreciated I am having similar issues. After extensive Googling sometime ago, the consensus was that this is a bug in the ojdbc driver, which I don't buy (why does it only in Grails?) LD. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Environment datasource details from serviceHello,
any idea how can I access datasource details from a service? I want to copy data from Grails database to an another one inside a service. Thank you, Ladislav. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Environment datasource details from serviceOn Thu, May 1, 2008 at 4:58 PM, Ladislav Skokan <lsk@...> wrote:
> Hello, > > any idea how can I access datasource details from a service? I want to > copy data from Grails database to an another one inside a service. > > Thank you, Ladislav. > If you declare a property in your service called "dataSource", Grails will inject an initialized DataSource for you... class FooService { def dataSource def doSomething() { def conn = dataSource.connection // ... } } I hope that helps. jb -- Jeff Brown Director North American Operations G2One Inc. http://www.g2one.com/ Autism Strikes 1 in 166 Find The Cause ~ Find The Cure http://www.autismspeaks.org/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Environment datasource details from service
Jeff,
if does not seems to work. the "dataSource" is always null. L. Jeff Brown napsal(a): On Thu, May 1, 2008 at 4:58 PM, Ladislav Skokan lsk@... wrote: --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Environment datasource details from serviceOn Thu, May 1, 2008 at 5:22 PM, Ladislav Skokan <lsk@...> wrote:
> > Jeff, > > if does not seems to work. the "dataSource" is always null. > > L. > Can you show me what your service class looks like? Also, can you show the class that is using the service? jb -- Jeff Brown Director North American Operations G2One Inc. http://www.g2one.com/ Autism Strikes 1 in 166 Find The Cause ~ Find The Cure http://www.autismspeaks.org/ --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Environment datasource details from servicethis is my service: class PricelistService { def dataSource boolean transactional = true def fromERPtoWeb() { println "!!! Info " + dataSource } } Invoking from controller, from list() def list = { def pricelistService = new PricelistService() pricelistService.fromERPtoWeb() .... L. Jeff Brown napsal(a): On Thu, May 1, 2008 at 5:22 PM, Ladislav Skokan lsk@... wrote: --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Environment datasource details from serviceYou shouldn't create a new service instance:
> def pricelistService = new PricelistService() use dependency injection like you did for the DataSource: def pricelistService def list = { pricelistService.fromERPtoWeb() .... and you'll get the proper singleton service instance with its dependencies injected. Burt On Friday 02 May 2008 1:44:50 am Ladislav Skokan wrote: > Jeff, > > this is my service: > > class PricelistService { > > def dataSource > > boolean transactional = true > > def fromERPtoWeb() { > println "!!! Info " + dataSource > > } > > } > > Invoking from controller, from list() > > def list = { > > def pricelistService = new PricelistService() > pricelistService.fromERPtoWeb() > .... > > L. > > > Jeff Brown napsal(a): > On Thu, May 1, 2008 at 5:22 PM, Ladislav Skokan <lsk@...> wrote: > > Jeff, > > if does not seems to work. the "dataSource" is always null. > > L. > > > > Can you show me what your service class looks like? Also, can you > show the class that is using the service? > > > > jb > > > > --------------------------------------------------------------------- To > unsubscribe from this list, please visit: > http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Environment datasource details from serviceIt works now, indeed. Thank you! L. Burt Beckwith napsal(a): You shouldn't create a new service instance: --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free Forum Powered by Nabble | Forum Help |