Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Creating connection pool (not db, other EIS-CICS) at server level

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We do have many applications which are connecting to EIS system(CICS). For that, we are creating and managing Connection Pool, using WAS's Custom Object Pool Mechanism. I am aware JBossEAP won't support Custom Object Pool concept. Could anyone provide me any valuable inputs, so that we can configure this type of connection pool at server level using any j2EE specfication and hence our underlying applications will look up and access it?
 
Saloon Keeper
Posts: 24335
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the JavaRanch, Raja!

There's a set of general purpose packages that can be used to manage resource pools in the apache.org Java libraries connections. I cannot give specific names, since among other things, those projects tend to move around and change names. At one time at least, I think it was under Apache "collections", but a web search should help.

The JDBC Connection Pool originally used for Tomcat and ealier versions of JBoss was itself one of those packages (dbcp) and DBCP was in turn building on an Apache collections pool library. Some of those resources may still be in use, since unless you need something that they don't provide easily and efficiently (for your particular requirements), why bother re-inventing - and re-debugging - one?

You may actually find something already available for CICS connectivity. Although I was under the impression that JMS/WebSphere MQ was the recommended interface between webapp servers and CICS.
 
raja kanganathan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim
It seems 'Apache Commons Pool' package dealing with pooling our custom objects. But, i am unsure about how to share this pool among applications? Can we able to bind this pool through JNDI? any idea, will JCA provide any efficient solutions?
 
Tim Holloway
Saloon Keeper
Posts: 24335
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I imagine that you could make some sort of shareable resource out of this, but I can't think of a J2EE function that relates. It would have to be some sort of hack, I think.

Have you considered fronting these services with Enterprise JavaBeans? Session EJBs are sharable and they already run from their own pool.
 
raja kanganathan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Tim,
In fact, we require this COBOL connection pool for our many ejb components. It is an old system, i think they encapsulates and manages the cobol connection pool separately for performance reason. Have any idea on binding objects in JNDI?
 
Tim Holloway
Saloon Keeper
Posts: 24335
167
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're saying what I think you're saying, what I'd do is define a Stateful Session EJB that contains a single CICS connection. Then I'd let the EJB instantiation/pooling mechanisms handle passing copies of it out to consumers as needed. That way you don't have to write any pool logic of your own or even incorporate an external pool library.

EJBs that implement remote access/multi-app sharing capabilities are automatically registered in JNDI and in EJB3 you should be able to reference those JNDI IDs via annotations in your client EJBs so that the system automatically injects connections as needed. Although to keep from monopolizing pool connections, you might prefer to explicitly look up the Connection EJBs and release them as needed (Service Locator pattern as opposed to IoC). JDNI lookup code examples are easy to find and the WildFly docs should have some specifics for that particular platform.
 
raja kanganathan
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much Tim. I got your point now and it should solve our current problem.
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic