Hi David; Answers are detailed under each of your question.
Thanks; --Gurkan ________________________________ From: David Ezzio <[email protected]> To: [email protected] Sent: Wed, January 13, 2010 6:10:42 PM Subject: Questions on using OWB to implement JSR 299 and JSR 330 for another app server ---------------------- Questions: 1. Have I identified all the SPI interfaces that need to be implemented? Yes, correct. 2. For an application server other than Geronimo, how useful is the code in the following modules likely to be? ==webbeans-jsf== * This plugin is independent from Geronimo or any other application server. This plugin provides Conversation implementation over JSF and also provides custom ViewScope. You can use this plugin in any application server that supports JSF 1.2 or JSF2. == webbeans-jms== * This plugin is also independent from Geronimo or any other application server. This plugin provides injection of JMS related artifacts like, ConnectionFactory, Connection, Session, Topic, Queue etc into bean objects. It just depends on JNDI name of the ConnectionFactory instance registered in an application server JNDI context. JNDI name of the connection factory instance is provided to OWB via user defined "openwebbeans.properties" file. It is defaulted as "ConnectionFactory" in "openwebbeans-default.properties" via property "org.apache.webbeans.spi.JNDIService.jmsConnectionFactoryJndi=ConnectionFactory" == webbeans-openejb == Currently "EJB Session Beans" support of the JSR-299 Specification(See Section 3.2 Session Beans of the specification) is handled by the Embeddable OpenEJB in Tomcat container. "webbeeans-core" module communicates with EJB containers via "EJBPlugin class". This plugin is implemented by EJB containers that provide EJB functionality of specification. In the webbeans-openejb module, there is an implementation of the class "org.apache.webbeans.ejb.EjbPlugin" ( OpenWebBeansEjbPlugin) that uses OpenEJB as an EJB container. Currently OWB supports EJBs in a collapsed-ear modules, i.e, all EJB beans are contained in a WAR module. How EJBs Work & EJB Discovery --------------------------- When WAR module is deployed in Tomcat, "BeansDeployer # deployFromClassPath" method in "webbeans-impl" module checks every class it founds in the WAR deployment archive. If founded class is a session bean class, it uses "EjbPlugin" to get EJB related bean instance. Otherwise it creates a ManagedBean instance. "webbeans-ejb" also provides "org.apache.webbeans.ejb.interceptor.OpenWebBeansEjbInterceptor" interceptor. Developers must annotated their EJB session bean classes with this interceptor. This interceptor is used for injecting JSR-299 beans into ejb session bean instance after EJB session bean instance is created. Currently, there is no any other integration or discovery point for EJB containers and classes. Also, JSR-299 based interceptors(using interceptor bindings) and decorators are not supported for EJB Beans altough their implementation are not so complex. == webbeans-geronimo == Actually, webbeans-geronimo module was created for Geronimo integration but now it provides Resource Service implementation over OpenEJB. Geronimo integration code will be put into Geronimo code base. Basically, this code in here will be moved to "webbeans-openejb" module and this module will be deleted. 3. For test driven development, I'm thinking of using the two TCKs for a test suite. Does this strategy seem reasonable? There are two TCKs that OWB is required to pass for fully compatible with JSR-299 specification: * JSR-330 TCK : Currently, its jar is not put in a central maven repositories, so we are using maven version of this TCK from JBoss repository. This dependency is defined in a module "atinject-tck". "atinject-tck" is the module that tests all test cases that are defined in the TCK. TCK test suite is defined by "inject-tck-1.0.0-PFD-3.jar" in "pom.xml". This jar contains TCK related artifacts (tests, bean classes etc.) We implemented "org.apache.webbeans.atinject.tck.OpenWebBeansAtInjectTck", to run the tests in the "inject-tck-1.0.0-PFD-3.jar" for our implementation. Currently OWB is passed JSR-330 TCK. You can run it via "mvn clean test". * JSR-299 TCK : There are 3 types of TCK testing 1* Standalone tests *These are tests that are not needed to use fully compliant Java EE 6.0 server. These are simple unit tests. * OWB currently pass 460 of 580 standalone tests! * You can also run those tests via mvn test in webbeans-tck 2* Integration tests * These are tests that are run inside fully compliant Java EE 6.0 server. * As an experience, some tests are unique to Weld (RI implementation) https://jira.jboss.org/jira/browse/CDITCK-59 3* Embedded EJB or Java EE web profile container tests * These are tests that are run inside embedded EJB container or Java EE web profile * Currently this type of TCK is not developed by the Weld Team. It is an issue. https://jira.jboss.org/jira/browse/CDITCK-85 https://jira.jboss.org/jira/browse/CDITCK-51 https://jira.jboss.org/jira/browse/CDITCK-52 * I have been trying to run those types of the inside OpenEJB+Tomcat container. We have to update some configuration of TCK to run tests. But there is some problem with configuration. I have also created a jira issue for this configuration error. https://jira.jboss.org/jira/browse/CDITCK-88 * All of the standalone tests are also run in OpenEJB+Tomcat 4. How useful will webbeans-porting be in implementing a TCK harness for another app server? *webbeans-porting* module provides TCK SPI implementation classes. One must implement TCK SPI classes for running TCK suite. There are two important implementation classes here; * ContainersImpl : This is used for running TCK tests in Java EE servers. Currently webbeans-porting does not provide this implementation. This implementation must be provided for each Java EE servers. For OpenEJB+Tomcat, we are using JBoss provided TomcatConnector class. This class provides implementation of "Containers" for Tomcat container. * StandaloneContainersImpl: This is used for running standalone TCK tests. Currently, we use this implementation for standalone tests. Integration tests are annotated in TCK with @IntegrationTest. So we are excluding them while running standalone TCK. 5. I believe that webbeans-tck has been deprecated, and the TCK source is now found in the Geronimo repository. Is that correct? Is that its official residence? This is no correct. "webbeans-tck" module is used for running JSR-299 TCK in standalone and for OpenEJB+Tomcat modes. Actually, it contains configuration files for running TCK suite. It uses "webbeans-porting" for TCK-SPI implementations. "webbeans-tck" uses "src/test/resources" folder for its configuration. For container testing (OpenEJB+Tomcat), update "jboss-test-harness.properties" as follows: #Integration Test org.jboss.testharness.spi.Containers=org.jboss.testharness.integration.tomcat.TomcatConnector org.jboss.testharness.standalone=false org.jboss.testharness.libraryDirectory=target/dependency/lib org.jboss.testharness.runIntegrationTests=true org.jboss.testharness.api.TestLauncher=org.jboss.testharness.impl.runner.servlet.ServletTestLauncher "libraryDirectory" is used for adding any library with deployed modules. For example, currently we are listing dependency libs. in "pom.xml". Therefore "deployed" war archives contain all necessary libraries in their "WEB-INF/lib" folder. Basically tests are run in Java EE server by TCK suite as follows : When you start TCK test suite, TCK creates related deployment archive (WAR,EJB,EAR) for each test case and deploys it into the application server using provided "ContainersImpl". After that it uses "ServletTestLauncher" class for running their tests in a Java EE server environment. #Standalone Test org.jboss.testharness.standalone=true org.jboss.testharness.runIntegrationTests=false Those tests are simple tests that are run by TCK suite using "StandaloneContainers" implementation. 6. Is the atinject-tck the TCK for JSR 299? Is this the official residence of that TCK? As I explained above section. "atinject-tck" module is not a TCK-suite. TCK suite is provided by "inject-tck-1.0.0-PFD-3.jar" in its dependency. This module provides functionality for running "JSR-330 TCK" test suite (inject-tck-1.0.0-PFD-3.jar) for OpenWebBeans implementation. I would very much appreciate specific answers and perhaps, if necessary, a mini-tutorial of 2-3 paragraphs. I hope those answers help! --Gurkan Thanks, David ___________________________________________________________________ Yahoo! Türkiye açıldı! http://yahoo.com.tr İnternet üzerindeki en iyi içeriği Yahoo! Türkiye sizlere sunuyor!
