You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ext2 (JIRA)" <ji...@apache.org> on 2011/05/10 06:47:03 UTC

[jira] [Created] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

CXF attachment doesn't compatible with SUN's  ACTIVATION library
----------------------------------------------------------------

                 Key: CXF-3505
                 URL: https://issues.apache.org/jira/browse/CXF-3505
             Project: CXF
          Issue Type: Bug
            Reporter: ext2


if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034629#comment-13034629 ] 

Freeman Fang commented on CXF-3505:
-----------------------------------

Hi,

Thanks for the testcase, I believe you're using JDK5,right? I can see this difference when I switch back to use JDK5, as with JDK6, by default it will always use SUN built-in activation lib unless we endorse it, so with JDK6 this problem is more severe, as you'll always see this bug.

Yeah,using SUN activation lib can cause your conclusion 1)cannot release http-connection.
But your conclusion 2)if user-application doesn't consume the inputstream, just close it. A temporary file will be left on disk and keep open(which I believe tracked by another jira CXF-3504) has nothing to do with this issue, it's actually caused by a bug in org.apache.cxf.attachment.MimeBodyPartInputStream, after close MimeBodyPartInputStream, shouldn't be able to read it, which isn't the case currently.

Freeman

> CXF attachment doesn't compatible with SUN's  ACTIVATION library
> ----------------------------------------------------------------
>
>                 Key: CXF-3505
>                 URL: https://issues.apache.org/jira/browse/CXF-3505
>             Project: CXF
>          Issue Type: Bug
>            Reporter: ext2
>            Assignee: Freeman Fang
>         Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

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

ext2 updated CXF-3505:
----------------------

    Attachment: attachment-clean.zip

> CXF attachment doesn't compatible with SUN's  ACTIVATION library
> ----------------------------------------------------------------
>
>                 Key: CXF-3505
>                 URL: https://issues.apache.org/jira/browse/CXF-3505
>             Project: CXF
>          Issue Type: Bug
>            Reporter: ext2
>         Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

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

Freeman Fang reassigned CXF-3505:
---------------------------------

    Assignee: Freeman Fang

> CXF attachment doesn't compatible with SUN's  ACTIVATION library
> ----------------------------------------------------------------
>
>                 Key: CXF-3505
>                 URL: https://issues.apache.org/jira/browse/CXF-3505
>             Project: CXF
>          Issue Type: Bug
>            Reporter: ext2
>            Assignee: Freeman Fang
>         Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

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

Freeman Fang resolved CXF-3505.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.5
                   2.4.1

commit fix
http://svn.apache.org/viewvc?rev=1104697&view=rev for trunk
http://svn.apache.org/viewvc?rev=1124152&view=rev for 2.3.x branch

> CXF attachment doesn't compatible with SUN's  ACTIVATION library
> ----------------------------------------------------------------
>
>                 Key: CXF-3505
>                 URL: https://issues.apache.org/jira/browse/CXF-3505
>             Project: CXF
>          Issue Type: Bug
>            Reporter: ext2
>            Assignee: Freeman Fang
>             Fix For: 2.4.1, 2.3.5
>
>         Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

Posted by "ext2 (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031018#comment-13031018 ] 

ext2 commented on CXF-3505:
---------------------------

the problem is somewhat releate the javax.acivation.DataHandler's implement; check the difference of two activation library:

Geronimo's :
    public DataHandler(DataSource ds) {
        this.ds = ds;
        this.flavor = new ActivationDataFlavor(ds.getContentType(), null);
    } 
	// getContentType() of CXF's LazyDataSource will en-force it to be loaded; then:  attachments(not last one) will cached, and the last attachment still keep delegate to network stream;

Sun's:
    public DataHandler(DataSource ds) {
	// save a reference to the incoming DS
	dataSource = ds;
	oldFactory = factory; // keep track of the factory
    }
	//doesn't call any method of LazyDataSource, so it cannot enforce the CXF's LazyDataSource to Load; so the attachments are not cached; Then 2 problem will occurs: 1) cannot release http-connection 2)if user-application doesn't consume the inputstream, just close it. A temporary file will be left on disk and keep open;



> CXF attachment doesn't compatible with SUN's  ACTIVATION library
> ----------------------------------------------------------------
>
>                 Key: CXF-3505
>                 URL: https://issues.apache.org/jira/browse/CXF-3505
>             Project: CXF
>          Issue Type: Bug
>            Reporter: ext2
>         Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3505) CXF attachment doesn't compatible with SUN's ACTIVATION library

Posted by "ext2 (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3505?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13031015#comment-13031015 ] 

ext2 commented on CXF-3505:
---------------------------

1)attachment is a POM project for testing this problem; the test app is 
SunActivationClientAttachmentRelease.java

2) while I cannot give a simple assertion for such a test to check system socket's status; but the test program has such special points:
2.1) the client will invoke the server continuously; and the KEEP-ALIVE options is disabled;
2.2) if using geronimo's activation , we will find many "TIME_WAITING" status socket at server side; it's correctly, because  "TIME_WAITING" is inevitable status according to tcp-ip protocol;
2.3) if using sun's activation, we will find some "FIN_WAIT2" status socket at server side, and "CLOSE_WAITING" status at client side. this is not correctly and indicate that the server socket is closed but client socket hasn't;

> CXF attachment doesn't compatible with SUN's  ACTIVATION library
> ----------------------------------------------------------------
>
>                 Key: CXF-3505
>                 URL: https://issues.apache.org/jira/browse/CXF-3505
>             Project: CXF
>          Issue Type: Bug
>            Reporter: ext2
>         Attachments: attachment-clean.zip
>
>
> if using sun's javax.activation api (version 1.1) instead of geronimo's activation api. CXF's attachments . the http connection cannot be released corrrectly;

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira