cancel
Showing results for 
Search instead for 
Did you mean: 

Connections - Headed for a Crash?

Former Member
0 Kudos

I am looking at the growing number of connections listed in the Console and I wonder if I am headed for a crash.

I am running version 5.5.42.83 on Solaris with Oracle 10g as the database. I have a web app written in Java running on WebSphere. The web app has an EJB that connects to MDM once (first page view) and then reuses that connection until ejbRemove() is called. The ConnectionAccessor is set by calling ConnectionPoolFactory.getInstance(hostname);

The app is running on 2 app servers.

What is confusing to me is that the list of connections in the Console is growing since we went live on Saturday night (about 164 as of now, with 52 showing Last Activity Time on today).

So, will MDM crash?

Also, should I use SimpleConnectionFactory instead?

Or, should I be changing the timeout and max connection values before calling ConnectionPoolFactory.getInstance(hostname)?

Any help/advice will be greatly appreciated.

Thanks in advance.

Bruce

Accepted Solutions (0)

Answers (1)

Answers (1)

Greg_Austin
Active Participant
0 Kudos

Bruce are you creating and using user sessions in your application?

If so you should destroy them with the DestroySessionCommand when you are done with them.

Former Member
0 Kudos

Hi Greg,

I do use DestroySessionCommand() to kill my UserSession and RepositorySession, but that is only done in ejbRemove() (which theoretically has not happened yet).

I found that when I was creating/destroying user and repository sessions for each page view, the creating was taking 5-10 seconds each time. Too long, so I changed the ejb to keep my connection and session objects.

Former Member
0 Kudos

For the MDM Java API, for each authenticated user session or repository session, there is a corresponding entry in the Console. There is no relation as to how many connections are open.

If the number of entries in the Console is increasing, there's a chance you are creating sessions but not destroying the sessions.

From my experience, creating and authenticating a session never take 5-10 seconds. Are there other factors involve here?

Former Member
0 Kudos

Hello Nick!

I remember you from the old A2i ver 1.33 days!

Is there documentation anywhere that explains the "best practices" with regard to connecting to MDM via Java? We don't have Netweaver or Portal, so our website and MDM are standalone. I am curious to know, should I be setting min and max connections? Should I change the timeout value? If I get a UserSession and RepositorySession when my EJB starts, will they time out? And is that what I am seeing in the Console?

As to the create/authenticate taking 5-10 seconds, it may be a data or structure issue. Like maybe we have unnecessary keyword=normal fields.

Former Member
0 Kudos

Hi Bruce,

I am not aware of any documentation for best practices on MDM connections. There are probably a number of factor you need to take into consideration when setting the min and max number of connections: concurrent load, peak load, socket resource, etc. As for the timeout, it's pretty much what is acceptable for your application. The timeout is how long the API should wait for a response from the server. You can find more information by doing a search on SO_TIMEOUT.

Currently sessions don't timeout. We are looking into providing a way for sessions to timeout.

I don't know much about EJB. When are the sessions created, during the bean creation or during activation? As long as you destroy the sessions you created, the entries in the Console should go away.