IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  How to access environment parameters from code

    Posted 05/15/09 10:30 AM

    Hi,

    I have set up a new environment parameter inside Implicit variables.

    How do I access it from java code?

    Regards,

    Eric


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 2.  RE: How to access environment parameters from code

    Posted 05/18/09 05:16 AM

    Hi Eric,

    First you have to import following,

    import javax.naming.InitialContext;

    then create a context object,

    InitialContext context = new InitialContext();

    then create a object and assign the environmental variable to that

    Object result = context.lookup(“java:comp/env/” + “link”);

    then convert to a string

    String tempLink=result.toString();

    Hope this will help

    Regards,
    Sunil_N


    #MWS-CAF-Task-Engine
    #webMethods
    #webMethods-BPMS


  • 3.  RE: How to access environment parameters from code

    Posted 05/18/09 05:19 AM

    Here in this

    Object result = context.lookup(“java:comp/env/” + “link”);

    “link” is environmental variable name

    Regards,
    Sunil_N


    #webMethods
    #MWS-CAF-Task-Engine
    #webMethods-BPMS