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 » Connecting to SolidDB using message broker JCN

Post new topic  Reply to topic
 Connecting to SolidDB using message broker JCN « View previous topic :: View next topic » 
Author Message
Santosh_Ghalsasi
PostPosted: Mon Oct 31, 2011 2:14 am    Post subject: Connecting to SolidDB using message broker JCN Reply with quote

Novice

Joined: 01 Feb 2011
Posts: 19

Hi,
I want to connect to SolidDB version 6.5.0.6 using message broker JCN.
Following steps have been done.
1. I have written the code to register and connect to solid DB using Type 4 JDBC driver. For this I have got - SolidDriver2.0.jar as driver.
2. I have added the path of jar file into CLASSPATH variable.
3. The version of Message broker is 6.1.0.2
4. When I am running the flow, I am getting exception - java.lang.ClassNotFoundException: solid.jdbc.SolidDriver
at line - java.sql.Driver d = (java.sql.Driver)Class.forName("solid.jdbc.SolidDriver").newInstance();
5. The code was tested successfully long back on broker version 6.1.0.9.
6. I am not aware of what additional settings(if any) were made at that time.

I want to know if 6.1.0.2 supports this type of connectivity and if it does then what are the settings to be done to make it work.

Please help me on this.

Thanks.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 31, 2011 3:43 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

It should be fine to use any valid JDBC driver with the level of Java that your broker supports.

You SHOULD NOT put anything on CLASSPATH. It's the wrong approach in all cases.

Put it in shared-classes.

MAKE SURE TO RESTART BROKER.
Back to top
View user's profile Send private message
anandsitha
PostPosted: Mon Oct 31, 2011 3:52 am    Post subject: Reply with quote

Acolyte

Joined: 26 Jul 2011
Posts: 59

Hi

could u please check the below link.

http://www.ibm.com/developerworks/data/tutorials/dm-0905applogging/section5.html

Regards
Sithanandam
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 31, 2011 4:14 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

anandsitha wrote:
could u please check the below link.

http://www.ibm.com/developerworks/data/tutorials/dm-0905applogging/section5.html



Excellent link. But bear in mind
Quote:
Date: 07 May 2009
, so where the article talks about writing a program to read from solidDB outside of Broker because of ODBC/JDBC support issues, it may not be current.

It might, however, actually apply to Broker 6.1.0.2...

So, again, excellent link, but future readers pay attention to the little details.
Back to top
View user's profile Send private message
Santosh_Ghalsasi
PostPosted: Tue Nov 01, 2011 4:14 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2011
Posts: 19

I have gone through the link and there also it is mentioned to include the path of SolidDriver2.0.jar into CLASSPATH. I was searching on this and found that there is something called as mqsicreateconfigurableservice that can be used to create a user defined service and later you should use mqsichangeproperties and mqsisetdbparms to register in broker.

Is anybody having idea of this?
Back to top
View user's profile Send private message
Santosh_Ghalsasi
PostPosted: Tue Nov 01, 2011 9:33 pm    Post subject: Reply with quote

Novice

Joined: 01 Feb 2011
Posts: 19

One more point that I want to highlight is there are two versions of message broker coexisting on this box where I am trying to execute the code. 6.1.0.2 and 7.1.0.3. For these versions, JRE5 and JRE6 are also coexisting on the machine. We have differentiated these version by using two different users.

Can the coexistence of two JREs cause the problem??
Back to top
View user's profile Send private message
Santosh_Ghalsasi
PostPosted: Fri Nov 04, 2011 2:55 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2011
Posts: 19

Hi,
It worked for me

I reconfigured the classpath of driver and restarted the broker.
No other settings are required.

Thanks all for your suggestions.!! )
Back to top
View user's profile Send private message
Santosh_Ghalsasi
PostPosted: Thu Nov 17, 2011 12:38 am    Post subject: Reply with quote

Novice

Joined: 01 Feb 2011
Posts: 19

Hi,
I am trying to connect to Solid DB using getJDBCType4Connection method. For this I have followed below steps.
1. created a configurable service using mqsicreateconfigurableservice.
parameters that are usedwith option -n are(with respective values in -v option)
databaseType,
connectionUrlFormat,
description,
jarsURL,
portNumber,
serverName,
type4DatasourceClassName,
type4DriverClassName
2. Put SolidDriver2.0.jar file at the path mentioned in jarsURL parameter
3. Stopped and started the broker.

This works for me when I use below format of connectionUrlFormat
jdbc:solid://<DB_IP>:<port>/<user>/<pwd>
SolidDB has a concept of connection switch. Means it has two databases- Primary and Secondary. If primary DB fails for some reason, or could not be connected, one should try to connect to Secondary.

For this setting, the connectionUrlFormat should be as below

jdbc:solid://<DB_IP1>:<port1>,<DB_IP2>:<port2>/<user>/<pwd>

When I am using mqsichangeproperties to change this property it is only taking the string till comma - jdbc:solid://<DB_IP1>:<port1>
I tried with ';' instead of ',' but its not working.

Please help me if anyone have idea on this.

Thanks,
Back to top
View user's profile Send private message
saurabh867
PostPosted: Thu Nov 17, 2011 3:29 am    Post subject: Reply with quote

Voyager

Joined: 13 Jun 2010
Posts: 78

Hi,
As you mentioned that you are doing this in JCN (java class), did you try to test it using a simple java class?

If you can connect from the simple java program than use the same code snippet with broker.
I think you should be able to connect then. Either deploy the jar file along with your bar file or place it in shared classes.

Regards,
Saurabh
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 » Connecting to SolidDB using message broker JCN
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.