Topic
  • 4 replies
  • Latest Post - ‏2013-09-30T11:40:32Z by zahsul
zahsul
zahsul
3 Posts

Pinned topic WAS 8 - Work Area support for Web servicess (context propagation)

‏2013-09-25T05:36:12Z |
Hi,
 
I've tried propagation work area context for EJB from one WAS 8 server to another one and it works fine. Now I need to do the same for Web services. In accordance with documentation it should work same way. In work area configuration I've checked "Enable Web Service propagation" and restarted servers. I'm using JAX-WS web services. It's not working for Web services - I can not retrieve property from work area on the second server (the one the host web service) that was set on the first one. As I mentioned, I can retrieve it from EJB deployed on the second server. I tried both work area service and work area partition service and behavior is the same.  We are using DataPower.  Any advice? 
Thanks,
   Zahar

 

 

// On First Server

      try {
            InitialContext jndi = null;
            UserWorkArea userWorkArea = null;

            jndi = new InitialContext();
            userWorkArea = (UserWorkArea)jndi.lookup(
                "java:comp/websphere/UserWorkArea");

            userWorkArea.begin("TestWorkArea");

            // set property
               userWorkArea.set("lifedoctest",
                  "test", PropertyModeType.read_only);
            }

            // EJB call here
            // Web service call here

            userWorkArea.complete();

// -----------------------------------------------------------
// On Second Server  (EJB/Web service)
//
            InitialContext jndi = null;
            UserWorkArea userWorkArea = null;
                jndi = new InitialContext();
                userWorkArea = (UserWorkArea)jndi.lookup(
                       "java:comp/websphere/UserWorkArea");

            String invoker = userWorkArea.getName();
            logger.info("**--** Work Area name is: " + invoker);
            String property = (String) userWorkArea.get("lifedoctest");
            logger.info("**--** Property is: " + property);
  • AlexMulholland
    AlexMulholland
    32 Posts
    ACCEPTED ANSWER

    Re: WAS 8 - Work Area support for Web servicess (context propagation)

    ‏2013-09-27T13:26:12Z  
    • zahsul
    • ‏2013-09-27T09:56:13Z

    Alex,

    thanks for reply. Yes, I've checked 'EnableWebServicePropagation' as in documentation (I tried both for service and for partition). Context propagation for Web service doesn't work in either case. It works in both cases for EJB. We are using WebSphere 8.0.0.6

    Waiting your feedback

      Thanks,

           Zahar

    Hello Zahar,

    I'm afraid I can confirm that Work Area propagation is only supported for JAX-RPC web service requests, not for JAX-WS.  I'm not keen to recommend that you switch to JAX-RPC since it's older technology and has been deprecated by Java EE.  If this propagation is important for your application you should raise a request for enhancement at this link:  https://www.ibmdw.net/wasdev/help/submit-rfe/

    I'm sorry I couldn't be of more help in this instance.

     

    Regards, Alex

     

  • AlexMulholland
    AlexMulholland
    32 Posts

    Re: WAS 8 - Work Area support for Web servicess (context propagation)

    ‏2013-09-26T13:32:07Z  

    Hello,

    I believe this should work; are you setting the 'EnableWebServicePropagation' attribute to true for the WorkArea service (or your partition)?  That is documented here:

    http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-dist&topic=twa_propagate

    I will check that this is supported specifically for JAX-WS and post again.

    Regards, Alex.

     

  • zahsul
    zahsul
    3 Posts

    Re: WAS 8 - Work Area support for Web servicess (context propagation)

    ‏2013-09-27T09:56:13Z  

    Hello,

    I believe this should work; are you setting the 'EnableWebServicePropagation' attribute to true for the WorkArea service (or your partition)?  That is documented here:

    http://www14.software.ibm.com/webapp/wsbroker/redirect?version=matt&product=was-express-dist&topic=twa_propagate

    I will check that this is supported specifically for JAX-WS and post again.

    Regards, Alex.

     

    Alex,

    thanks for reply. Yes, I've checked 'EnableWebServicePropagation' as in documentation (I tried both for service and for partition). Context propagation for Web service doesn't work in either case. It works in both cases for EJB. We are using WebSphere 8.0.0.6

    Waiting your feedback

      Thanks,

           Zahar

  • AlexMulholland
    AlexMulholland
    32 Posts

    Re: WAS 8 - Work Area support for Web servicess (context propagation)

    ‏2013-09-27T13:26:12Z  
    • zahsul
    • ‏2013-09-27T09:56:13Z

    Alex,

    thanks for reply. Yes, I've checked 'EnableWebServicePropagation' as in documentation (I tried both for service and for partition). Context propagation for Web service doesn't work in either case. It works in both cases for EJB. We are using WebSphere 8.0.0.6

    Waiting your feedback

      Thanks,

           Zahar

    Hello Zahar,

    I'm afraid I can confirm that Work Area propagation is only supported for JAX-RPC web service requests, not for JAX-WS.  I'm not keen to recommend that you switch to JAX-RPC since it's older technology and has been deprecated by Java EE.  If this propagation is important for your application you should raise a request for enhancement at this link:  https://www.ibmdw.net/wasdev/help/submit-rfe/

    I'm sorry I couldn't be of more help in this instance.

     

    Regards, Alex

     

  • zahsul
    zahsul
    3 Posts

    Re: WAS 8 - Work Area support for Web servicess (context propagation)

    ‏2013-09-30T11:40:32Z  

    Hello Zahar,

    I'm afraid I can confirm that Work Area propagation is only supported for JAX-RPC web service requests, not for JAX-WS.  I'm not keen to recommend that you switch to JAX-RPC since it's older technology and has been deprecated by Java EE.  If this propagation is important for your application you should raise a request for enhancement at this link:  https://www.ibmdw.net/wasdev/help/submit-rfe/

    I'm sorry I couldn't be of more help in this instance.

     

    Regards, Alex

     

    Thanks, Alex! At least I know I needn't try it. That's a pity that it's not supported