[ 
http://issues.apache.org/jira/browse/HIVEMIND-118?page=comments#action_64770 ]
     
Richard Sang commented on HIVEMIND-118:
---------------------------------------

for example:

class:
public class Address implements Serializable {
    private String  street;

    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

}

configuration:
    <service-point id="Address" >
        <create-instance class="genet.action.Address" model="threaded"/>
    </service-point>

running:
        registry.setupThread();
        Address service = (Address) 
registry.getService("genet.action.Address",genet.action.Address.class);
        service.setStreet("street"); // this line's OK
        try {
            System.out.println("address:" + service.getStreet()); // will get 
ClassCasting exception
        } catch (Exception e) {
            e.printStackTrace();
        }

Thanks 


> Threaded service bean ClassCastException
> ----------------------------------------
>
>          Key: HIVEMIND-118
>          URL: http://issues.apache.org/jira/browse/HIVEMIND-118
>      Project: HiveMind
>         Type: Bug
>   Components: framework
>     Versions: 1.1
>  Environment: jdk1.5, linux 2.6.11
>     Reporter: Richard Sang

>
> I want to put Webwork action as threaded services (quick-and-dirty mode), and 
> I could set action beans property,
> but when I try to get property of the action, I got exception:
> java.lang.ClassCastException: genet.action.FormTest
>         at 
> $$FormTest_103b31fee7c_103b31fee7f._service($$FormTest_103b31fee7c_103b31fee7f.java)
>         at 
> $$FormTest_103b31fee7c_103b31fee7f.getUser($$FormTest_103b31fee7c_103b31fee7f.java)
>         at 
> $$FormTest_103b31fee7c_103b31fee80.getUser($$FormTest_103b31fee7c_103b31fee80.java)
>         at genet.main.ActionMain.main(ActionMain.java:51)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to