cancel
Showing results for 
Search instead for 
Did you mean: 

connection pool - api

Former Member
0 Kudos

Hi,

the following code try to connect mdm with connection pool :

<i>

Context ctx = new InitialContext();

IConnectionFactory connFactory =

(IConnectionFactory) ctx.lookup("deployedAdapters/MDM Factory/shareable/MDM Factory");

IConnectionSpec spec = connFactory.getConnectionSpec();

spec.setPropertyValue("UserName", Consts.MDM_USER);

spec.setPropertyValue("Password", Consts.MDM_PASS);

spec.setPropertyValue("Server", Consts.MDM_SERVER);

spec.setPropertyValue("Port", Integer.toString(Consts.MDM_PORT));

spec.setPropertyValue("RepositoryLanguage", Consts.MDM_REGION);

connection = connFactory.getConnectionEx(spec);

INative nativeInterface = connection.retrieveNative();

return (CatalogData) nativeInterface.getNative(CatalogData.class.getName());

</i>

my catalogData is null and i see in logs:

<b>failed to connect server mgnt278 due to:Could not open minimum connections.</b>

Can You Help ?

Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi BenAmram,

I have not faced this problem before but one thing that I would like to sugesst is to put a check at each step using "try/catch" like, when you get ConnectionFactory object, when you set the ConnectionSpec, when you get INative ojbect etc.

It may help if you go

forum post.

Just check the compatibility of the MDM4J APIs and the MDM Server you are trying to connect.

Regards,

Mausam