Unsolved
This post is more than 5 years old
4 Posts
0
1712
March 28th, 2011 08:00
Java XAM API: can XSystem instance be shared across threads?
We have a system connecting to EMC Centera via the Java XAM API. Currently we create a new XSystem instance when needed, read/write as necessary and then close the instance. We potentially can have many concurrent read/write operations on multiple threads, so each thread has its own XSystem instance.
However, creating an XSystem instance is a relatively expensive operation, and is having an adverse effect on performance. My question is: do I only need to create a single (static) XSystem instance that can then be used across all threads? Is there any problem with keeping a connection open for an indefinite period? Is it possible for the connection to time out? If so, how can I detect this?
Many thanks in advance for your help.
mckeown_paul
409 Posts
1
March 28th, 2011 08:00
You should do one xsystejm connect when your application starts and use it for all your IO threads and only close it when your application terminate
The connetion will not timeout.
This is our best practise recommendation for xsystem connection management
gairey
4 Posts
0
March 29th, 2011 00:00
Excellent. Thanks for a quick and definitive answer. Is the best practice documented anywhere?
mckeown_paul
409 Posts
0
March 29th, 2011 05:00
It's published in the Documents section of this community
https://community.emc.com/docs/DOC-3303