2 Replies Latest reply on Nov 25, 2009 7:45 AM by Nicklas Karlsson

    CanDI and Resin

    Arbi Sookazian Master

      So I was just on the www.caucho.com site and downloaded Resin Pro 4.0.2.  Apparently there's a Windows version (I downloaded the zip, not the tar) but don't see any foo.bat file in the distro.

      Am I missing something?  I see only a resin.sh in the bin directory...

      Anyways, what are some major differences b/n Weld and CanDI?

        • 1. Re: CanDI and Resin
          Arbi Sookazian Master

          [09-11-24 15:35:25.417] {main} Resin[id=] started in 1781ms

          so that's impressive compared to JBoss startup time. 

          This is a very good example: http://localhost:8080/resin-doc/examples/ioc-binding/index.xtp this covers the CDI design patterns I was asking about in a separate thread.

          The @Current annotation tells Resin to look for a Hello component in the Java Injection repository.

          Isn't @Current no longer in the CDI API or is that a EE6 annotation?

          The @com.caucho.config.Name annotation tells Resin to lookup the greeting String in Java Injection directory using Resin's internal @Name binding 'greeting' when the session bean is created.

          Won't @com.caucho.config.Name be possibly confused with @javax.inject.Named?

          Resin will create a stub implementing Hello and store it in the Java Injection directory with type Hello and name @Name(HelloBean).

          What exactly is the Java Injection directory in CDI-spec terminology equivalent?

          Another similar reference in a beans.xml file:

          <beans xmlns="http://java.sun.com/xml/ns/javaee">
               - 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 directory under your classes
               - directory or in your jar file.

          Is the following true?:

          Java Injection beans = CDI managed beans

          • 2. Re: CanDI and Resin
            Nicklas Karlsson Master

            These questions are probably best suited for their forums but my guesses

            • They are probably in the process of migrating their impl to the lastest spec version.

            • JID is probably container or context

            • JI Beans is probably CDI managed beans