Skip to Content
avatar image
Former Member

How to use SessionManager (MDM 5.5 SP06 JAVA API 2) with TrustedConnection

Hello MDM 5.5 SP06 JAVA API Experts,

Is it possible to Use the SessionManager in conjunction with TrustedConnections ? The trusted connection is setup properly (adding the client IP to the allow.ip file on MDM-Server).

I tried a lot but I didn't succeed with the new JAVA API 2 SessionManager functionality.

I'm initializing a UserSessionContext object and set the field for trusted connections to true.

Later I request an instance of SessionManager and call the createSession() method.

Although I've set the trustedConnection (=true) field of UserSessionContext, I get an exception, if the password is not set correctly. Due to my understanding, the password should be ignored if the UserSessionContext --> trustedConnection field is set to true. Is this a bug or am I missing any important step ?

I have also used several constructors of UserSessionContext but no chance.

Could anyone use the SessionManager with trusted Connections ?

Any help would be greatly appriciated.

Best regards.

      public static void main(String[] args)
        Settings settings = new Settings();

        RepositoryIdentifier repId = new RepositoryIdentifier(settings.repository,

        //Create a UserSessionContext
        //UserSessionContext sessionContext = new UserSessionContext("<servername>", "<repositoryName>", "<userName>");
        UserSessionContext sessionContext = new UserSessionContext( "<servername>", repId, "English [US]", "<userName>"); 

        //Get an instance of SessionManager
        SessionManager sessionManager = SessionManager.getInstance();
        //Create user session
        String userSession = 
        sessionManager.createSession(sessionContext, SessionTypes.USER_SESSION_TYPE, "<any pwd !!!>");
        System.out.println("Created user SessionID: " + userSession);


Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    May 14, 2008 at 03:18 PM


    Please go through the link below.You need to do some settings for Trusted Connection to work


    Go to Appendices -> Trusted Connections


    Jitesh Talreja

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 14, 2008 at 05:26 PM

    Hello Jitesh Talreja,

    thanks for your reply and hint. The trusted connection configuration on MDM server is already setup correctly.

    My concrete problem is to establish a trusted connection using the SessionManager.

    If I use the TrustedUserSessionCommand, everything works.

            CreateUserSessionCommand createUserSessionCommand = new CreateUserSessionCommand(connection);
            session = createUserSessionCommand.getUserSession();
            state = STATE_SESSION_ESTABLISHED;
                TrustedUserSessionCommand tuscTrustedUser = new TrustedUserSessionCommand(connection);
                session = tuscTrustedUser.getSession();
             catch ( e) 
                /* In Case the Connection is not Trusted */
                System.out.println("Could not established trusted connection!!!");

    But I want to make use of the SessionManager advantages see [MDM Java API Guide|] -> API Structure and Basic Concepts

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member


      the usage of SessionManager with TrustedConnection had a bug and is fixed since Hotfix 2!

      I've tested the functionality in following version successfully:

      MDMJ55006P2HF_8-10003460.ZIP / MDM 5.5 SP06 Java API Patch 2 Hotfix 8 (Build

  • avatar image
    Former Member
    Jun 25, 2008 at 10:14 AM

    Ahmet Macar

    Please help me...if you any have documents post in this massages

    We need to apply MDM 5.5 SP06 patch02 with all hotfix.s


    Rama K Junnuru

    Add comment
    10|10000 characters needed characters exceeded