Scott,

I downloaded the snapshot and holy cow man this stuff rocks!

I was able to get my own "singleton" up and running and from your previous
email I was stoked that you can simply @Named a class and use it directly in
an EL expression -- that's just too awesome!

Since I just beat through your new documentation I thought I would share the
following two comments:

Need to update your resin-web.xml to something like:

WEB-INF/resin-web.xml

  <!-- Allows you to explicitly scan classes for injection -->
  <class-loader>
    <!-- The directory below should contain META-INF/beans.xml -->
    <compiling-loader path="/path/to/java/classes"/>
  </class-loader>

  <web-app xmlns="http://caucho.com/ns/resin";>
    <servlet-mapping url-pattern="/comet"
servlet-class="example.CometServlet"/>
  </web-app>


Might be nice to add something like this to your comment in the beans.xml:

<Beans xmlns="urn:java:ee">
  <!--
     - META-INF/beans.xml is used as a marker to tell Resin to scan all
     - classes in the directory tree for Java Injection beans.  The matching
     - beans will be available for injection using @javax.inject.Current
     -
     - Simply place this file in a META-INF folder under your classes 
     - directory or in your jar file.
    -->
</Beans>

Awesome job!

Aaron

> -----Original Message-----
> From: resin-interest-boun...@caucho.com [mailto:resin-interest-
> boun...@caucho.com] On Behalf Of Scott Ferguson
> Sent: Wednesday, February 11, 2009 12:05 PM
> To: General Discussion for the Resin application server
> Subject: Re: [Resin-interest] Context and Dependency Injection
> 
> 
> On Feb 11, 2009, at 8:38 AM, Aaron Freeman wrote:
> 
> > Scott,
> >
> > I have finally caught up with understanding where you are going with
> > the new
> > Resin IoC -- I am excited to use it.  I'd like to do some of the
> > things on
> > this doc: http://www.caucho.com/resin/doc/resin-ioc.xtp but I don't
> > see
> > where to download a release-candidate for the JSR-299 stuff?  I made
> > it
> > here: http://jcp.org/en/jsr/detail?id=299 but I don't see any
> > release-candidates that I can download.  Any hints?
> 
> I just put up a new 4.0 snapshot at http://caucho.com/download.  The
> 4.0 snapshot isn't stable, but it does implement the latest Java
> Injection draft, so you can start working with it.
> 
> I've been very happy with how JSR-299 (Java Injection) has developed.
> It's amazingly powerful.
> 
> -- Scott
> 
> >
> >
> > Thanks,
> >
> > Aaron
> >
> >
> >
> > _______________________________________________
> > resin-interest mailing list
> > resin-interest@caucho.com
> > http://maillist.caucho.com/mailman/listinfo/resin-interest
> 
> 
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to