D2fsContext session management

KJurkowski
edited October 9, 2014 in Documentum #1

Hello,

I created a D2 plugin which extends D2CheckoutService and implements IPluginAction.

My question is can I safely call


IDfSession session = context.getSession();

and do not care about releasing the session.

If yes why there is a D2fsContext::release(boolean exception) method?

Tagged:

Best Answer

  • Antal Bos
    edited October 9, 2014 #2 Answer ✓

    Hi,

    A new session can be created like this:

    D2fsContext d2fsContext = (D2fsContext)context;

    IDfSession session = d2fsContext.getSession();

    As far as I know the releasing is done by D2 automatically, so there is no need to call the release method explicitly in your custom code.

    Best regards,

    Antal

Answers

  • Antal Bos
    edited October 9, 2014 #3 Answer ✓

    Hi,

    A new session can be created like this:

    D2fsContext d2fsContext = (D2fsContext)context;

    IDfSession session = d2fsContext.getSession();

    As far as I know the releasing is done by D2 automatically, so there is no need to call the release method explicitly in your custom code.

    Best regards,

    Antal