[JBoss Seam] - Re: Injecting EJB3 into a POJO
by jarkko@jab.fi
@In cause the stuff below:
anonymous wrote :
| Caused by: java.lang.IllegalArgumentException: Could not set field value by reflection: DragDropBean.kohdeEditor on: fi.jab.jsf.icefaces.DragDropBean with value: class org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$36c63494
| at org.jboss.seam.util.Reflections.set(Reflections.java:75)
| at org.jboss.seam.Component.setFieldValue(Component.java:1547)
| ... 105 more
| Caused by: java.lang.IllegalArgumentException: Can not set fi.tc.business.KohdeEditorBean field fi.jab.jsf.icefaces.DragDropBean.kohdeEditor to org.jboss.seam.intercept.Proxy$$EnhancerByCGLIB$$36c63494
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146)
| at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150)
| at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:63)
| at java.lang.reflect.Field.set(Field.java:657)
| at org.jboss.seam.util.Reflections.set(Reflections.java:61)
| ... 106 more
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994099#3994099
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994099
19 years, 4 months
[JBoss Seam] - Re: Basic Seam questions
by lightbulb432
That works, thanks.
1) I've left my destroy() method as in the example from the previous post. What I don't understand, though, is don't @Remove and @End conflict in any way? It seems like if @End is called, the conversation ends, and if @Remove is called, then the SFSB is removed? But I never call @Remove...
The Seam tutorial says SFSB must have an @Destroy @Remove method...but it seems like @Remove does one thing and @Destroy does another. Why must they both be defined on the same method?
2) When using conversations, is it required to use a stateful session bean as opposed to stateless? What about an extended persistence context as opposed to a transaction-scoped one?
3) From the earlier posts about the Seam-Managed Persistence Context, how do I use it? What should I set @PersistenceContext(type=???????) to?
4) Is there a way to catch any exception from an action method and return a certain string, such as "failure"? I could place a catch block inside every action method, but that seems like a pain.
Is there some way to specify (through XML or annotations) that if a certain or any exception is thrown, that you simply return a certain value from the action method?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3994096#3994096
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3994096
19 years, 4 months