Skip to Content
0
Former Member
Jul 13, 2006 at 06:20 AM

MDM Java Connector : connection problem

38 Views

Hi All,

I'm using MDM Java Connector to get a connection to MDM Repository. I have all the JAR files included and all the references given in the Web Dynpro Application. I get the connection with MDM repository perfectly and perform operations too.

But, the problem is if I run the same application 2-3 times it starts giving error like.."Login Method not executed properly". Does anyone know what could be the possible problem here??

The code I'm using,

//Obtain the initial JNDI context
 Context ctx = new InitialContext();
//Perform JDNI lookup to obtain connection factory
IConnectionFactory connectionFactory =(IConnectionFactory)ctx.lookup("deployedAdapters/MDM Factory/shareable/MDM Factory");
//Get Connection Spec to set connection properties
IConnectionSpec spec = ConnectionFactory.getConnectionSpec();
//Set Connection Properties
 spec.setPropertyValue("UserName", <username>);
 spec.setPropertyValue("Password", <password>);
 spec.setPropertyValue("Server", <server>);
 spec.setPropertyValue("Port", <por>);
 spec.setPropertyValue("RepositoryLanguage", <lang>);

//Get the Connection
IConnection connection = connectionFactory.getConnectionEx(spec);
		
wdComponentAPI.getMessageManager().reportSuccess("Connection Established");
		
//Retrieve Native inteface
 INative nativeInterface = connection.retrieveNative();
//Get the CatalogData the physical connection
 CatalogData catalog = (CatalogData)nativeInterface.getNative(CatalogData.class.getName());

Regards,

Mausam