[jboss-user] [JBoss Seam] - Outjection problems with interface variables

toni do-not-reply at jboss.com
Sun Feb 11 08:48:32 EST 2007


Hi,

I have the problem that I can't outject an instance of an Entity Bean from a SFSB into a context variable.

The instance field of the SFSB from which I'm trying to outject the EntityBean is an INTERFACE, which two of my Enity Beans implement.

I think this is causing problems. I can tell that there is something wrong, because if I use the following code in the SFSB

@Out(required = false)
InterfaceCitySettable interfaceCitySettable;

then changes to the variable are NOT reflected in the context variable of the current conversation after invoking the SFSB.

However, if I change the code to

@Out(value="somethingnonexistent", required = false)
InterfaceCitySettable interfaceCitySettable;

then the EntityBean gets successfully outjected into the context variable "somethingnonexistent" of the current conversation.

Why is this?

I think it has to with the fact that the variable of the SFSB from which I'm trying to outject is an INTERFACE, which my hold two types of EntityBeans.

It seems to me that the first Entity Bean, which gets outjected into the context variable kind of write protects it or something like this.

After that I can only outject the same class into the interace, but not any other class also implementing the interface.

I appreciate any suggestions and comments, because I'm really kind of stuck on this one.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4014489#4014489

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4014489



More information about the jboss-user mailing list