Creating a extension to connect Lucee through IBM Informix

I need to create an extension to connect Lucee through IBM Informix Datasource. I’ve found a JDBC driver at IBM Informix JDBC Driver - javalibs

Does anyone help me doing it?

Given your post is lacking technical details, I suggest

connect to informix via your os command line, troubleshoot from there as I doubt you set permissions correctly, ports or anything else. If you find this helpful find a charity and donate a few bucks to it.

import java.sql.Connection;
import java.sql.DriverManager;

public class TestConnection {

	public static void main(String args[]) {

		String url="jdbc:informix-sqli://informix02:9500/portal" +
			":INFORMIXSERVER=portal02";
		
		Connection connection = null;

		try {

			String driver = "com.informix.jdbc.IfxDriver";
			Class.forName(driver).newInstance();
			System.out.println("Obtained Informix driver.");
		}
		catch( Exception e ) {
			System.out.println("Failed to load Informix driver.");
			e.printStackTrace();
			return;
		}

		try {
			System.out.println("Using url: "+url);
			connection = DriverManager.getConnection(
				url, "username", "password");
			System.out.println("Connected");
		}
		catch( Exception e ) {
			e.printStackTrace();
		}
		finally {
			if( connection != null ) {
				try {
					connection.close();
				}
				catch( Exception e ) {
					e.printStackTrace(); 
				}
			}
		}
	}

Hi Terry, thanks a lot for your contribution, although I’d like to create an extension for IBM Informix as Lucee recommends through that tutorial: Extensions in Lucee 5 :: Lucee Documentation

The correct JDBC driver I’ve found at Download Informix JDBC Driver | Connect to Informix and it works perfecly on ColdFusion 2021 update 2.

Now, I’d like to implement it as other extensions were implemented e.g. SQL Server, H2, TERADATA, MariaDB, mongoDB etc.

Really great you want to do that!!! Did you see how @Julian_Halliwell created the mariaDB extension? I never did an extension on my own, but I’m sure you can look at Julians code. He uses the OSGi compliant offical MariaDB jar driver. I’m sure it’s worth taking a peek at his repository and se how he did it:

1 Like

@Sceiffer Hope this is helpful to you Connecting to Firebird Database - #10 by Darth