This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Access JDBC from within a JBI component Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Access JDBC from within a JBI component" Watch "Access JDBC from within a JBI component" New topic

Access JDBC from within a JBI component

Wryan Hulslander

Joined: May 25, 2011
Posts: 1
What is the easiest way to access a JDBC connection from within a JBI component?

Here's what's going on - someone wrote a JBI component in GlassFish to do some Healthcare EDI messaging - it really was complete and utter overkill for what was needed. It's basically a socket listener that opens a socket and listens for messages - when it gets one, it drops it on a JMS queue and send back a "thanks!" kind of response. Originally the "component" used a flat-file to read in information as to what socket to listen on. I need to change this to look at a DB instead. All I wanna do is query the DB for some settings instead of pulling them from a file. Shouldn't I be able to just embed the jdbc prepared statement calls and call the jdbc service? Or do I have to basically build another JBI component that accepts some sort of API call and gives me back a result set?

I'm just confused. When the code used to pull the data from the DB is just a regular "bean" it works great - but I get things like "java.sql.SQLFeatureNotSupportedException: This operation is not supported." when I do it from within the JBI component.

Any insight would be deeply appreciated...


I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Access JDBC from within a JBI component
It's not a secret anymore!