users@glassfish.java.net

Re: trouble with ejb decendency injection in managed bean

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Tue, 01 Nov 2011 14:28:41 -0700

The semantics are different, and unless absolutely necessary, this
approach should be avoided.

-marina

Alexis Moussine-Pouchkine wrote:
> but not encouraged, right?
> The semantics are different.
> -Alexis
>
> On 1 nov. 2011, at 22:17, Marina Vatkina wrote:
>
>
>> It is ok for an EJB to implement both interfaces...
>>
>> -marina
>>
>> Alexis Moussine-Pouchkine wrote:
>>
>>> ProtudoWebFassade needs to be a declared as a JSF managed bean (or did you forget to add it to the code pasted?).
>>> An EJB should also not implement both Local and Remote interfaces. Chose one and remove the other.
>>> -Alexis
>>>
>>> On 1 nov. 2011, at 11:00, forums_at_java.net wrote:
>>>
>>>
>>>
>>>> Hello everybody,
>>>>
>>>> I've written an JSF Application what uses a managed bean. The managed bean
>>>> forwart requests to the real session fassade, which implements a Local and a
>>>> Remote buniness interface. Because the JSF Application runs in the Web
>>>> container of the glassfish server, I thought, that i could use dependency
>>>> injection to inject the session facade to my managed bean.
>>>>
>>>> So could someone tell me i am wrong?
>>>>
>>>> The code is really simple. I will post it now.
>>>>
>>>> [java]
>>>>
>>>> @Local
>>>> public interface ProtudoLocalSessionFacadeInterface
>>>> {
>>>> public String GetDummyString();
>>>> }
>>>>
>>>> [/java]
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> [Message sent by forum member 'fluxy']
>>>>
>>>> View Post: http://forums.java.net/node/859089
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>
>