-
1. Re: Seam in a J2EE Environment
gavin.king Mar 27, 2007 5:26 PM (in response to neilac333)1) Depends what you mean. We currently have no special integration of JBoss AOP into Seam (though it is something we will probably do at some point in the future). However, by nature, JBoss AOP can enhance *any* class, it does not need to be any special kind of component. OTOH, most things that you might think you need AOP for can be accomplished via a Seam interceptor, which is just a MUCH easier construct. Add a meta-annotation to an annotation, then use the annotation on your Seam components. For things like logging, this is more than what you need...
2) Yes, but you would need to write some kind of factory or manager component for the EJB 2 bean (this is not hard, but nor is it as simple as it could be if Seam had built-in support for EJB3). We don't have anything built-in to Seam today. However, if this is some kind of blocking issue for you, let us know and we will implement it, it is already on the todo list, but no-one asked for it yet.
3) Depends. If you have the same interface, with multiple roles, you disambiguate via the component name. If you are simply trying to mock stuff out for tests, you use @Install(precedence=MOCK), which is IMO waywaywayway easier to use and more elegant than the XML-based solutions found in other IoC solutions. This is very well-covered in the latest reference docs for 1.2.1. -
2. Re: Seam in a J2EE Environment
neilac333 Mar 29, 2007 3:42 PM (in response to neilac333)Thanks, Gavin. If I may ask some follow-ups on those points:
1) Aren't Seam interceptors only relevant to EJB 3? It is my understanding that interceptors aren't available to POJO's except through AOP constructs.
2) I definitely anticipate needing support for EJB 2 integration in the future given that I will have to interact with a web service layer, but the need for me isn't immediate. Certainly in the next few months though.
3) I was looking at legacy docs, so I was unaware of the new precedence value called MOCK. Thanks for pointing that out.
I must say that the only thing that rivals the creative effort behind Seam is your own personal attention to the needs of the Seam community. Kudos once again to you and your team.
Thanks again. -
3. Re: Seam in a J2EE Environment
christian.bauer Mar 29, 2007 3:48 PM (in response to neilac333)The reference documentation describes how Seam interceptors can be applied to regular JavaBean components, with the same semantics/annotations as in EJB 3.0.
-
4. Re: Seam in a J2EE Environment
gavin.king Mar 29, 2007 4:13 PM (in response to neilac333)What exactly do you envisage needing in terms of the EJB2 integration?
Remember, if the client is an EJB3 Seam component, you can easily inject an EJB2 bean using @EJB and call its methods. Beyond that, what are your requirements?
Cheers. -
5. Re: Seam in a J2EE Environment
neilac333 Mar 30, 2007 11:07 AM (in response to neilac333)Christian, I will check out the reference documentation to learn more about the application of Seam interceptors to regular JavaBean components.
Gavin, my client here has an enterprise authentication web service that I am hoping to leverage to facilitate authentication into the application I am building. I envisage using a Seam-managed POJO calling on an EJB 2.1 SLSB to make the authentication call. (This will all be deployed to WebLogic 9.2 incidentally.) It may very well be that the @EJB injection is sufficient. I will certainly take a look at that. Any further insight is appreciated.
Thanks. -
6. Re: Seam in a J2EE Environment
gavin.king Mar 30, 2007 12:36 PM (in response to neilac333)Hum, no, sillyme, @EJB only works in EE5, of course, I got confused because of days between posts :-)
You can, however, use a normal JNDI lookup. If its only one or two spots in your code that you need this, just go down that route, you won't need anything else. OTOH, if you are calling *hundreds* or EJB2 beans, let me know.