geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <david.blev...@visi.com>
Subject Re: Webapp Annotation processing for 299
Date Mon, 24 Aug 2009 22:12:19 GMT
Quick correction, rar modules are not eligible as far as I know.

Basically, anywhere you can use a persistence.xml you can have a  
beans.xml.

-David

On Aug 23, 2009, at 11:00 PM, Gurkan Erdogdu wrote:

> Thanks a lot david jencks. Actually, webbeans can be included in any  
> ejb,war,ear,rar and library modules. But it is a good start with web  
> builders. Let's see how it works.
>
> --Gurkan
>
> 2009/8/23 David Jencks <david_jencks@yahoo.com>
> Hi Gurkan,
>
> to get a ModuleBuilderExtension to do anything it has to be  
> associated with a ModuleBuilder for a type of ee app which will call  
> it at the appropriate points during deployment.  I'm not sure what  
> kinds of ee modules web beans can included in, but I added the  
> OWBMBE to the jetty7 and tomcat6 builders in rev 806989.  If this is  
> not quite right you should be able to figure out what to do with  
> other module builders.
>
> hope this is in the right direction :-)
>
> thanks
> david jencks
>
> On Aug 23, 2009, at 5:32 AM, Gurkan Erdogdu wrote:
>
>> Hi David;
>>
>> I have deployed plugins(2 car ) into the server. Server calls  
>> OpenWebBeansModuleBuilderExtension while it starts. But it never  
>> calls "createModule, addGBeans" methods. Do I have to configure  
>> something for this?
>>
>> Thanks;
>>
>> --Gurkan
>>
>> 2009/8/22 Gurkan Erdogdu <cgurkanerdogdu@gmail.com>
>> Great help David!
>>
>> Thanks a lot. I will try to fill the blanks.
>>
>> --Gurkan
>>
>> 2009/8/22 David Blevins <david.blevins@visi.com>
>>
>> Great summary, thanks!
>>
>> So as I mentioned on the OpenEJB list and the reason I kicked the  
>> thread over here is that the ServletContextListener approach to  
>> scanning doesn't work as none of those things exist at deploy time.
>>
>> To try and move things forward I've created a basic plugin for  
>> OpenWebBeans that can serve as a starting point for the  
>> integration.  This will help get us out of the abstract and right  
>> down to the nuts and bolts.
>>
>> DEPLOYMENT
>>
>> Long story short, the code that scans the managed bean classes for  
>> @Resource etc. goes here:
>>
>> http://svn.apache.org/repos/asf/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans-builder/src/main/java/org/apache/geronimo/openwebbeans/deployment/OpenWebBeansModuleBuilderExtension.java
>>
>> The code to do the @Resource scanning is actually in there already,  
>> it's the line like this:
>>  namingBuilders.buildNaming(webApp, jettyWebApp, webModule,  
>> buildingContext);
>> What needs to happen in this class is we need to get a complete  
>> list of the managed bean classes so they can be scanned by the  
>> Geronimo naming builder.  This class is an extension to the  
>> Geronimo deployment system, so no webapp objects exist yet.  I know  
>> that the OpenWebBeans code doesn't currently work like this and  
>> relies on ServetContext and other things.  We will have to find a  
>> way to get that to work without the use of any servet APIs.
>>
>> A bonus is that you can install any servlets or filters or  
>> listeners you like into the webapp so when it boots, anything you'd  
>> like to add will be there without the user having to add it.  A  
>> pretty cool advantage to being part of the deployment system.  I've  
>> got some code in there that adds a ServletContextListener -- I left  
>> the classname of the listener blank, you just need to fill it in.
>>
>> For a great example of what the JSF deployer extension looks like,  
>> see this class:
>>
>>
>> https://svn.apache.org/repos/asf/geronimo/server/trunk/plugins/myfaces/geronimo-myfaces-builder/src/main/java/org/apache/geronimo/myfaces/deployment/MyFacesModuleBuilderExtension.java
>>
>>
>> RUNTIME
>>
>> Here's where you can add any startup and shutdown code you'd like:
>>
>> http://svn.apache.org/repos/asf/geronimo/server/trunk/plugins/openwebbeans/geronimo-openwebbeans/src/main/java/org/apache/geronimo/openwebbeans/OpenWebBeansGBean.java
>>
>> This will be guaranteed to run just before the webapp starts up and  
>> stop just after the webapp stops.  Great place for initialization  
>> code and taking care of getting any hooks into Geronimo that you  
>> might need/want for while the webapp is running.
>>
>> This doesn't tackle everything on the TODO list but is a step in  
>> the right direction.
>>
>> -David
>>
>>
>> On Aug 20, 2009, at 8:01 AM, Gurkan Erdogdu wrote:
>>
>> I want to give brief introduction about current implementation in  
>> the view of integration points
>>
>> Brief Summary About Current Situation
>> ---------------------------------------------------------
>> Currently we bootstrap OpenWebBeans via ServletContextListener. It  
>> supports following containers
>>
>> - Java Web Containers like Jetty, Tomcat etc.
>> - Tomcat Embeddable OpenEJB Container
>>
>> If developer wants to use OWB functionality in his application, it  
>> has to configure its "web.xml" to include some OWB specific  
>> classes. For EJB functionality, we use embeddable Tomcat OpenEJB  
>> container. To use EJB functionality, developer must annotate their  
>> EJB classes with OWB specific "Interceptor" class.
>>
>> How OWB Boots Currently(From integration point of view)
>> -------------------------------------------------------
>> 1* Web Container calls OWB specific context listener's "application  
>> started" method
>> 2* OWB container scans related classes from the artifacts (if META- 
>> INF/beans.xml, or WEB-INF/beans.xml exists. beans.xml is a marker  
>> for deployment)
>> 3* If developer configures OWB to use EJB functionality, for each  
>> scanned class, it asks OpenEJB to learn whether it is an EJB class  
>> or not (Using EJB Plugin that is written accroding to the OpenEJB)
>> 4* If it is an EJB class, it creates EJB bean and register it with  
>> the OWB container otherwise if it is a Java EE defined Managed Bean  
>> Class, it creates a "Managed Bean" and register it with the OWB  
>> container.
>>
>> Developer Responsibility to Use OWB
>> --------------------------------------------------------
>> 1* Add servlet context listener to his web module's "web.xml"
>> 2* Annotate EJB classes with OWB interceptor
>> 3* Configure OWB container to use EJB functionality
>> 4* Configure some OWB specific parameters (For example : if use JMS  
>> injections, specify ConnectionFactory JNDI name)
>>
>> Current Problems
>> -----------------------------------------------------
>> 1* Currently we just support "WAR" module with embeddable EJB.
>> 2* Developer requires to update WAR/EJB module metadata files to  
>> use OWB.
>> 3* Standalone EJB JAR,RAR, EAR not supported
>> 4* Injections into "Managed Beans" class not well supported. (For  
>> example : @Resource, @WebServiceRef, @EJB,  
>> @PersistenceUnit,@PersistenceContext.)
>>
>> How Could We Integrate with Geronimo
>> ---------------------------------------------------------
>> 1* Geronimo looks for deployment. If it contains "beans.xml", it  
>> automatically registers OWB servlet context listener with WAR's  
>> web.xml at deployment time
>> 2* Automatically registers OWB EJB interceptor with EJBs at  
>> deployment time (If module is EJB module or EAR module containing  
>> EJB modules)
>> 3* Support EJB JAR, EAR, RAR modules
>> 4* Write EJB Plugin for Geronimo
>> 5* Supports injections for Managed Beans
>>
>> I hope this helps a bit more
>>
>> Thanks;
>>
>> --Gurkan
>>
>> 2009/8/20 Rick McGuire <rickmcg@gmail.com>
>> Gurkan Erdogdu wrote:
>> >>>We'd be interested in any details about what integration work  
>> might be needed to add this to Geronimo.
>> It is a really fascinating thing that you support us to finish  
>> implementation and pass TCK :) We really need a help.
>> I think there is a great willingness to help you with this, but I  
>> was looking form something more specific, such as the actual areas/ 
>> functions where integration assistance is needed.
>> Rick
>>
>>
>> Thanks;
>>
>> --Gurkan
>>
>> 2009/8/20 Rick McGuire <rickmcg@gmail.com <mailto:rickmcg@gmail.com>>
>>
>>
>>   Gurkan Erdogdu wrote:
>>
>>       Hi;
>>
>>       Thanks for kicking discussion David.
>>
>>       As you may already know Java EE 6 will be planned to release
>>       on  November. Do you have any plan or roadmap  to integrate
>>       JSR-299 with Geronimo?
>>
>>   We have a tentative roadmap for implementing the Web Profile at:
>>
>>   http://cwiki.apache.org/confluence/display/GMOxDEV/Road+map+for+JEE6+Web+Profile
>>
>>   For the JEE6 plans, the web profile did not include JSR 299, which
>>   I guess has changed recently.  We'd be interested in any details
>>   about what integration work might be needed to add this to  
>> Geronimo.
>>   Rick
>>
>>
>>       We are working hard to implement full specification but it has
>>       some parts that requires to integrate with Java EE server  
>> tightly.
>>
>>       Thanks;
>>
>>       --Gurkan
>>
>>       2009/8/20 David Blevins <david.blevins@visi.com
>>       <mailto:david.blevins@visi.com> <mailto:david.blevins@visi.com
>>
>>       <mailto:david.blevins@visi.com>>>
>>
>>
>>          I've been talking with Gurkan of OpenWebBeans over on the
>>       OpenEJB
>>          list and it seemed like a good idea to kick the thread over
>>       here
>>          as well.
>>
>>          The long and short of it is that we'll need to scan 299  
>> managed
>>          beans at deploy time exactly as we do for JSF.
>>
>>          Wanted to point him at the JSF scanning code, but can't
>>       remember
>>          the details.  Anyone remember?  An svn link is fine.
>>
>>
>>          -David
>>
>>
>>
>>
>>
>>
>>       --        Gurkan Erdogdu
>>       http://gurkanerdogdu.blogspot.com
>>
>>
>>
>>
>>
>> -- 
>> Gurkan Erdogdu
>> http://gurkanerdogdu.blogspot.com
>>
>>
>>
>>
>> -- 
>> Gurkan Erdogdu
>> http://gurkanerdogdu.blogspot.com
>>
>>
>>
>>
>> -- 
>> Gurkan Erdogdu
>> http://gurkanerdogdu.blogspot.com
>>
>>
>>
>> -- 
>> Gurkan Erdogdu
>> http://gurkanerdogdu.blogspot.com
>
>
>
>
> -- 
> Gurkan Erdogdu
> http://gurkanerdogdu.blogspot.com


Mime
View raw message