cancel
Showing results for 
Search instead for 
Did you mean: 

Connection Pool For Java MDM API 5.5

Former Member
0 Kudos

Hello all,

I want to implement to use Connection Pooling for maintaining connections to MDM server using Java MDM API.

Can you please list the best practices/design strategy/sample tutorial/code for implementing/using Connection Pooling using Java MDM API?

Regards,

Yogesh Bhatia

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Yogesh,

Try the code mentioned below:

// Declaring connectionPool variable

ConnectionPool connPool= null;

//Creating connection

connPool= ConnectionPoolFactory.getInstance(serverName);

// Getting the repository Id

RepositoryIdentifier reposId =

new RepositoryIdentifier(repositoryName,dbmsName, DBMSType.ORACLE);

// Retrieving regions from repository

GetRepositoryRegionListCommand regionList =

new GetRepositoryRegionListCommand(connections);

regionList.setRepositoryIdentifier(reposId);

try

{

regionList.execute();

}

catch (CommandException e)

{

e.printStackTrace();

}

May be it will solve your problem.

Regards,

Vibha

Former Member
0 Kudos

Hello Yogesh Bhatia

I want to implement to use Connection Pooling for maintaining connections to MDM server using Java MDM API.

Why do you need to implement "self-designed" connection pooling? Why don't to use standard pooling?

Writing functions which already have been written is not the correct way. Hope, you doesn't inventing a bicycle?

See Link:[ConnectionPoolFactory|http://help.sap.com/javadocs/mdm/current/com/sap/mdm/net/ConnectionPool.html] and interface description [ConnectionPool|http://help.sap.com/javadocs/mdm/current/com/sap/mdm/net/ConnectionPool.html]

Former Member
0 Kudos

Hello Alexander,

Thanks for your reply.

Yes I want to use the same classes ConnectionPoolFactory and ConnectionPool. I also want to use MDM Extension Layer class MDMSessionContext.

Can you give me sample code for using the same?

Regards,

Yogesh Bhatia

Former Member