ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Refactor Java to Use DB2 Configurable Service vs. DB_BUNDLE_

Post new topic  Reply to topic
 Refactor Java to Use DB2 Configurable Service vs. DB_BUNDLE_ « View previous topic :: View next topic » 
Author Message
EricCox
PostPosted: Fri Feb 21, 2014 1:47 pm    Post subject: Refactor Java to Use DB2 Configurable Service vs. DB_BUNDLE_ Reply with quote

Master

Joined: 08 Apr 2011
Posts: 292

To all,

I've created a DB2 JDBC Configurable Service and made a code change in Java to use it but it didn't work. What do I have to do to refactor the Java code to use the Configurable Service?

Here is the Java Code as it exists without using the Configurable Service:
Code:

private static final String DB_BUNDLE_NAME = "dbETLSTG";

public int createConnection() throws Exception{
      try {
         ConnHandler dbConnectionHandler = new ConnHandler(DB_BUNDLE_NAME);
         dbName = dbConnectionHandler.dbName;
         dbConnection = dbConnectionHandler.getConn();
         if (dbConnection == null) {
            throw new Exception("Could not connect to database");
         }
      } catch (Exception err) {
         if (dbConnection != null) {
            try {
               dbConnection.close();
            } catch (Exception ex) {
               //Ignore
            }
         }
         logger.error("Error getting the database connection", err);
         throw err;
      }
      return ReturnCodes.SUCCESS;
   }


When I try to change the DB_BUNDLE_NAME to the configurable service I get this error:
CRMRating.java'', line: '116'; trace text: ''Unable to process customer and facility transactions Can't find resource for bundle SETLSTG, key en_USCan't find resource for bundle SETLSTG, key en_US''; resource bundle: ''BIPv600''; key: ''4367''; inserts(optional): ''evaluate'', ''UPDATE_CRM_RISK_RATING.Facility Rating Webservice Request to Infolease'', ''java.util.MissingResourceException: Can't find resource for bundle SETLSTG, key en_US''

When I change the DB_BUNDLE_NAME to the name of the Configurable Service it complains about not being able to find the SETLSTG.properties file which doesn't exist. I need to tell it to stop looking for the properties file and use the configurable service.

How do I do that?

Thanks,
EMC
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Refactor Java to Use DB2 Configurable Service vs. DB_BUNDLE_
Jump to:  



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
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.