On Jun 19, 2008, at 7:43 PM, Karan Malhi wrote:

If I have a servlet as below:-

class Test extends HttpServlet{
   @EJB Calculator calc;
}

What injects the Calculator EJB into this servlet.

The problem I am facing right now with JSF is that I am using the
LegacyAnnotationProcessor which tries to inject by name otherwise uses
FQCN/field name
i.e

If I have a JSF managed bean like

package org.superbiz;
class Accountant {
  @EJB Calculator calc;
}

Then the LegacyAnnotationProcessor looks for a name in the annotation, if it
does not find a name, then it looks up org.superbiz.Accountant/calc

I could subclass the LegacyAnnotationProcessor for JSF and override this behaviour, but am curious as to how is it happening for servlets and not for
pojos.
A quick reply would be really appreciated.

Quick answer:

 AnnotationDeployer around line 549 we build up a bunch of classes
 AnnotationDeployer we process the annotations and update the web.xml


-David

On Tue, Jun 17, 2008 at 6:32 PM, David Blevins <[EMAIL PROTECTED]>
wrote:


On Jun 17, 2008, at 3:09 PM, Karan Malhi wrote:

I can definitely give myfaces a try once I get this fix in. I also wanted
to
try other JSF libraries and see if we faced any issues with those. Not
sure
if you are/were planning to work on something like this


I doubt anyone is looking at this, which makes it all that much more of a
valuable contribution.  Very very appreciated.

-David


On Tue, Jun 17, 2008 at 4:09 PM, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

Cool.  I didn't know you were working on this.

TomcatLoader is a good place to set this property. You may want to check if the property is already set before setting it incase the user wants a
custom provider.

Are you going to try the myfaces.apache.org JSF implementation also?

-dain


On Jun 17, 2008, at 11:32 AM, Karan Malhi wrote:

I wanted to set the *com*.*sun*.*faces*.*InjectionProvider* property


Look at the issue below:-


http://www.nabble.com/Tomcat-webapp-Configuration-to17037589.html#a17106031

On Tue, Jun 17, 2008 at 2:24 PM, Dain Sundstrom <[EMAIL PROTECTED]> wrote:

On Jun 17, 2008, at 8:54 AM, Karan Malhi wrote:


If I want to set a system property in openejb-tomcat, should I set it

somewhere in

org.apache.openejb.tomcat.catalina.TomcatLoader

or is there another place to add that code


It depends on what the system property will do. Normally, we let
users
set
system properties via the command line or the system.properties file.
If
the property is part of the integration, we normally set in them in
TomcatLoader.

Which specific property do you want to set?

-dain




--
Karan Singh Malhi





--
Karan Singh Malhi





--
Karan Singh Malhi

Reply via email to