This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI / IDMSDataSource) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI / IDMSDataSource)" Watch "Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI / IDMSDataSource)" New topic
Author

Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI / IDMSDataSource)

jonathan pilling
Greenhorn

Joined: Jul 24, 2008
Posts: 4
Hi there,

I have a rather interesting / complex problem......creating a connection to CA-IDMS from Tomcat using JDBC type 4 drivers (CA provide the type 4 driver).

We have a zSeries 9 IBM mainframe running CA-IDMS r16.1, and I need to connect to the IDMS from Tomcat (running on Linux) using the JDBC Type 4 drivers provided by CA.

At this stage I am struggling with the actual setup and configuration of Tomcat’s server.xml and web.xml files. These are the files where the JDBC configuration is set (I think). I have to setup the CA-IDMS part of the configuration, but that is a different problem. Basically there is a TCP/IP listener on the IDMS, waiting for incoming connections from the JDBC type 4 driver.

I set up a Tomcat to MySQL connection using MySQL Connector / J, which is a similar kind of process to what I am trying to achieve with IDMS. MySQL connector / J came with a jar file which is placed in Tomcat’s lib folder, and then the JDBC setup for the web application is created in Tomcat's server.xml and web.xml files. You can then connect to the MySQL database using JSP and the configured JDBC driver / connection. The CA-IDMS Server comes with an idmsjdbc.jar file, which I think is the JDBC typr 4 driver. I think it needs to be placed in the Tomcat /lib folder, but I don’t know how to set up the configuration.

There is a JDBC DriverManager which allows JDBC drivers to connect to CA-IDMS. The DriverManager recognises the following syntax:

jdbc:idms://hostname:port/database

This allows the JDBC driver running within Tomcat to connect to the IDMS which is running on the IDM mainframe. CA IDMS r16 supports direct connections from the Type 4 JDBC driver to the Central Version on IDMS. "hostname" is the DNS name or IP address of the machine where the CV is running, and "port" is the IP port that was specified for the listener PTERM (setup on the IDMS side).

There is a caidms.properties file for the JDBC driver, which is used to specify user ID, password, and optional accounting information. It can also be used to specify physical connection information, allowing an application to connect to a CA-IDMS database without requiring the definition of an ODBC style data source. However, I don’t know where to place this file within the Tomcat setup.

There is also an IdmsDataSource class. I don’t know where to configure this or how to set it up; the CA-IDMS Server manual states the following:

This class implements the JDBC DataSource interface. It is used with an application server (Tomcat) providing Java Naming and Directory Interface (JNDI) naming service to establish a connection to a CA IDMS database. IdmsDataSource properties conform to the Java Beans naming conventions and are implicitly defined by public “setter” and “getter” methods. For example, the “description” property, which is required for all DataSource implementations, is set using the setDescription(String) method. The application server may use the java.lang.reflection methods to discover DataSource properties and provide an interface to set them, or may simply require that they are defined in some configuration file. IdmsDataSource properties are used to specify the connection parameters. These properties are the equivalent of the DriverPropertyInfo attributes described in the previous section and can be used to completely define the parameters needed to connect to a database. Like a URL, an IdmsDataSource object can also reference an “ODBC” style data source name, where the connection parameters are defined in the configuration file on Linux.

Is there anyone that can try to point me in the right direction to setting up the JDBC connection? I am totally new to Java and so the instructions are not making much sense at the moment. Any help, hints, tips…..anything will be greatly appreciated as I have just hit a brick wall here. I can't find much to do with setting up the CA-IDMS Server JDBC type 4 driver online either....if anyone can point me to some resources that would also be extremely useful.

Kind regards
Jp
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Jonathan,
Welcome to JavaRanch! We have a Tomcat forum a bit further down in the list. I'm going to move this for you so a Tomcat expert can help you out. Don't worry, the link in the original JDBC forum will take you right there.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
jonathan pilling
Greenhorn

Joined: Jul 24, 2008
Posts: 4
Jeanne Boyarsky wrote:Jonathan,
Welcome to JavaRanch! We have a Tomcat forum a bit further down in the list. I'm going to move this for you so a Tomcat expert can help you out. Don't worry, the link in the original JDBC forum will take you right there.


ops: Sorry about that!

Thanks for the welcome!

Hopefully I will get a better response now this is in the correct forum!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help: Connecting Tomcat to CA-IDMS Using JDBC Type 4 Drivers (JNDI / IDMSDataSource)
 
Similar Threads
Connecting to CA-IDMS via JDBC drivers
sqlserver datasource configuration
JBoss 4.0 and MSSQL Server 2000
Cannot lookup JNDI resource for MySql JDBC driver on Tomcat & Axis
JDBC datasource problem - WAS4.0