1 Reply Latest reply on Dec 30, 2010 5:04 PM by Ramesh Reddy

    Retrieve the values from ExecutionContext

    Rakesh Balguri Expert

      Hi all,

       

      I had created a custom JCA connector which connects to the DB2  data base.

      I also had created a custom translator which uses this JCA connector for getting the connection to the database.

       

      Now the connector retrieves the username, password and database URL from -ds.xml deployed in JBoss.

       

      My requirement is that I need to retrieve the username and password from the ExecutionContext and pass them  to my connector so that it connects to DB2 using the user name and password retrieved from the Execution Context.

       

      Please tell me how do I do this. What steps do I need to follow in order to do this.

       

      thanks

      Rakesh

        • 1. Re: Retrieve the values from ExecutionContext
          Ramesh Reddy Master

          Rakesh,

           

          First of all the translator for DB2 is already available in the Teiid, you do not need custom translator. The ExecutionContext has a method called "getSubject()" that will return the subject for the logged in user into Teiid not the data source.

           

          If you are looking for custom security at the "data source" based on the logged in user etc. please read about Login Modules in the Admin Guide. If you want you can create your own custom login module.

           

          HTH.

           

          Ramesh..