-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate in Websphere Message Broker Java Compute Node
PostPosted: Wed Aug 28, 2013 2:01 am 
Newbie

Joined: Wed Aug 28, 2013 1:52 am
Posts: 1
I use Hibernate in my JSF application to manage a database. The entities have finders and some other methods.

I have a need to integrate this data into a WebSphere Message Broker (WMB) application. I can load all the classes just fine, my entities work up to making the connection to the JDBC Oracle database.

Now I can connect to that same database from WMB application using a Configurable JDBC Service from Java, as follows...

Code:
try {
              // Obtain a java.sql.Connection using a JDBC Type4 datasource - in this example for a
              // JDBC broker configurable service called "MyDB2" 

              Connection conn = getJDBCType4Connection("DOCDBCS",
                           JDBC_TransactionType.MB_TRANSACTION_AUTO);

              // Example of using the Connection to create a java.sql.Statement 
              Statement stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                           ResultSet.CONCUR_READ_ONLY);
              ResultSet rs = stmt.executeQuery("SELECT * FROM NGATE_USER.DOC_RULE_DEFINITION"); 
             


So I am getting a good Connection and can execute Statements ok. How do I get hibernate to use this same connection?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.