Sorry, i dont know how to edit the text. (Is it possible?)

If i now would have a running NiceClass, could i inject it somewhere
with guice as i would with any other class?

Bye

On 10 Mrz., 22:03, opn <[email protected]> wrote:
> Hello!
>
> I found an interesting blog entry today and tried to implement it in a
> test application.
>
> Here is the 
> url:http://gianluigidavassiuk.blogspot.com/2009/11/ejb3-plus-guice-how-ex...
>
> Now, as mentioned in the topic, im using Glassfish that runs in
> netbeans or i have a tomcat 6 server accessible via lan or internet
> where i am (trying to) deploying my application.
>
> Now my only problem is that i dont know what i have to use as the
> identifier for the bean to look it up in those two environments
> (glassfish / tomcat).
>
> "bind(EJB3TestRemote.class) .annotatedWith(Names.named("EJB3TestRemote")) 
> .toProvider(fromJndi(EJB3TestRemote.class,"EJB3Test/
> remote"));"
>
> The author says thats specific to JBoss. What do i have to use?
>
> -----
>
> 01      public class  NiceClass {
> 02
> 03       @Inject @Named("EJB3TestRemote")
> 04       private EJB3TestRemote test;
> 05
> 06       public void tryJndi() throws NamingException {
> 07
> 08        System.out.println( test.statelessMethod("JBOSS HELLO") );
> 09       }
> 10      }
>
> Can i use Constructor injection in that style too?
>
> And one last question, in the end the author mentions that the @Named
> annotation is not useful. How would it look like without it?
>
> I'd be really happy if there was someone who can give me detailed
> information about this. I think while googling i found a link to a
> Guice book that gives information about this but for Guice 1.0

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to