Question

I'm presently working on making an web application for filenet, I'm presently getting the objectstore and vwsession objects by calling a method in static classes .

Everytime I call these methods its againg getting the connection, I can store these objects in httpsession but those are heavy objects and that might a problem.

what is the best way to get these objects from or where to store these

EDIT: I'm using java and using filenet 4.x

Was it helpful?

Solution

Caching the Content Engine Connection object in your code will cause you security-related errors after several minutes. Internally, the CE Java API does connection caching, so there is no network round-trip after the first call to fetch the connection, so there is no need to do your own caching of this object.

The PE connection can be cached without the same issues, but be very careful if you serialize the object because if someone malicious can deserialize it they can access your system with it. You need to have get a separate connection object for each distinct set of user credentials.

I would suggest you don't cache anything until you profile your code and see a performance problem that caching solves, because internally the APIs do some caching and you might end up just caching twice and potentially making things even slower.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top