You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Deepal Jayasinghe (JIRA)" <ji...@apache.org> on 2007/04/30 19:28:15 UTC

[jira] Created: (AXIS2-2607) MessageContext.getProperty does not work correctly

MessageContext.getProperty does not work correctly 
---------------------------------------------------

                 Key: AXIS2-2607
                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
            Reporter: Deepal Jayasinghe
            Priority: Blocker


When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2607) MessageContext.getProperty does not work correctly

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe resolved AXIS2-2607.
--------------------------------------

    Resolution: Fixed

I test with trunk and it worked fine , ServiceGroupContextTest will test that scanrio as well.

Thanks
Deepal

> MessageContext.getProperty does not work correctly 
> ---------------------------------------------------
>
>                 Key: AXIS2-2607
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Deepal Jayasinghe
>            Assignee: Deepal Jayasinghe
>            Priority: Blocker
>
> When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-2607) MessageContext.getProperty does not work correctly

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-2607:
----------------------------------------

    Assignee: Deepal Jayasinghe

> MessageContext.getProperty does not work correctly 
> ---------------------------------------------------
>
>                 Key: AXIS2-2607
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Deepal Jayasinghe
>         Assigned To: Deepal Jayasinghe
>            Priority: Blocker
>
> When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2607) MessageContext.getProperty does not work correctly

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493363 ] 

Deepal Jayasinghe commented on AXIS2-2607:
------------------------------------------

Yes , Context hierarchy should do that. Unfortunately with option concept everything has gone wrong . That is why that we need to have logic in message context to do the right thing , I know we had the correct code but some one has removed that , w.o knowing what he is doing. I agree that we need to add test cases to test them.

I will add a test case ..... , so that no one will be able to break that.

> MessageContext.getProperty does not work correctly 
> ---------------------------------------------------
>
>                 Key: AXIS2-2607
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Deepal Jayasinghe
>         Assigned To: Deepal Jayasinghe
>            Priority: Blocker
>
> When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2607) MessageContext.getProperty does not work correctly

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493349 ] 

Glen Daniels commented on AXIS2-2607:
-------------------------------------

1) Shouldn't the ContextHierarchyTest be checking this?  When I looked in testCompleteHiracy (sic) I didn't see this exact test, so I added a couple of lines to confirm that it works, and it seems to (will check in, along with spelling fixes).  Did you fix this already?

2) Could you explain more about what you mean, and perhaps include a test case? :)


> MessageContext.getProperty does not work correctly 
> ---------------------------------------------------
>
>                 Key: AXIS2-2607
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Deepal Jayasinghe
>         Assigned To: Deepal Jayasinghe
>            Priority: Blocker
>
> When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2607) MessageContext.getProperty does not work correctly

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493394 ] 

Deepal Jayasinghe commented on AXIS2-2607:
------------------------------------------

Hi Glen,

I had a written a session aware sample as you can see below [1] , the sample worked fine in Axis2 1.1 but when I tried to run the same sample in 1.2 it was giving error. The issue I found is in the service side we are not setting up the parent correctly so the logic in the AbstartcContext always returns null [2].

[1]
public class SampleService4 {

    private static String INT_VALUE = "value";

    public void init(ServiceContext serviceContext) {
        System.out.println("I am inside service init method");
        //setting a property
        serviceContext.setProperty(INT_VALUE, "0");
    }

    public void destroy(ServiceContext serviceContext) {
        System.out.println("I am inside service destroy ");
    }


    public int add(int value) {
        MessageContext msgctx = MessageContext.getCurrentMessageContext();
        String intValue = (String) msgctx.getProperty(INT_VALUE);
        int previousValue =0;
        if(intValue!=null){
            previousValue = Integer.parseInt(intValue);
        }
        int currentValue = previousValue + value;
        msgctx.getServiceContext().setProperty(INT_VALUE, "" + currentValue);
        return currentValue;
    }
}


[2] -
 public Object getProperty(String key) {
        Object obj;

        obj = properties == null ? null : properties.get(key);

        if ((obj == null) && (parent != null)) {
            obj = parent.getProperty(key);
        }

        return obj;
    }

I think setting up the parent will fix the issue. I need to look at SVN history to find out the changes b/w 1.1 and 1.2. 


> MessageContext.getProperty does not work correctly 
> ---------------------------------------------------
>
>                 Key: AXIS2-2607
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Deepal Jayasinghe
>         Assigned To: Deepal Jayasinghe
>            Priority: Blocker
>
> When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-2607) MessageContext.getProperty does not work correctly

Posted by "Glen Daniels (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493388 ] 

Glen Daniels commented on AXIS2-2607:
-------------------------------------

Hi Deepal. :)

OK, take a deep breath and please explain what you mean here IN DETAIL.  Your description isn't very helpful right now.  Please describe the exact problem (what exactly is going wrong, what code are you talking about, how does Options affect it) so that we have it archived and everyone can understand it.  Thanks!

> MessageContext.getProperty does not work correctly 
> ---------------------------------------------------
>
>                 Key: AXIS2-2607
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2607
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Deepal Jayasinghe
>         Assigned To: Deepal Jayasinghe
>            Priority: Blocker
>
> When I store some property  in ServiceContext and try to get that from MessageContext it always returns null. When I look at the code I found the issue. AFAIK this is a major issue and I think we need to release 1.2.1 with the fix.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org