Hi tapestrycn-

If you're ok with a fixed max size, you can set it directly in hivemind
instead of the page:

<create-instance
class="com.test.MultipartDecoderImpl,maxSize=<testSize>"
model="threaded"/>

Otherwise you may need to define another stateful `CurrentMasSize'
service that just holds the max size, pass it to your MultipartDecoder
implementation in hivemind config and inject the new service into your
page, where you would set the value on the service rather than the
decoder.

        -Yori


-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] On Behalf Of tapestrycn
Sent: Saturday, July 23, 2005 4:45 AM
To: [email protected]
Subject: MultipartDecoder implemention with ClassCastException



I implemnet MultipartDecoder and set in hivemind.xml with following:

 <implementation service-id="tapestry.multipart.MultipartDecoder">
        <create-instance class="com.test.MultipartDecoderImpl" 
model="threaded"/>
    </implementation>

In test.page inject the servcie:

  <inject property="multipartDecoder" 
object="service:tapestry.multipart.MultipartDecoder"/>

Then in page class test.java do following:

 public abstract MultipartDecoder getMultipartDecoder();


.......
((com.test.MultipartDecoderImpl)
getMultipartDecoder()).setMaxSize(testSize);


However,I got ClassCastException with error 
message:$MultipartDecoder_10542d65842

Could anybody tell me how to solve the urgent problem?

Thanks,
tapestrycn




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to