Hi Thiago - thanks for your answer,
See comments below...

On Wed, May 4, 2011 at 6:06 PM, Thiago H. de Paula Figueiredo <
thiag...@gmail.com> wrote:

> On Wed, 04 May 2011 12:51:05 -0300, Magnus Kvalheim <mag...@kvalheim.dk>
> wrote:
>
>
>>  How would I make that play with Tapestry?
>> *=Server=*
>> * Use a JEE 6 Web Profile compliant server (like Glassfish).
>> * Does anyone have experience with development? Does Tapestry live reload
>> work?
>>
>
> Live reload of Tapestry classes (pages, components and mixins) would work.
> Live reload of services (beans) wouldn't.
>

Sounds good - have yet to try development from anything other than jetty..

>
>  *=Injecting beans from CDI=*
>>
>> Following this path my beans and ejb's are now managed by CDI(Weld).
>> How would I get access to these beans in Tapestry?
>>
>
> You can hook other IoC containers (CDI, Spring, EJB, etc) into
> Tapestry-IoC, so you can use Tapestry's @Inject or JSR 330 @Inject normally
> and get these outside-provided beans as if they were T-IoC ones. JumpStart
> code does this for EJB and tapestry-spring for Spring, so you can take a
> look at them for insipiration.
>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/state/ejb3
>
>
> http://svn.apache.org/viewvc/tapestry/tapestry5/branches/maint-5-2/tapestry-spring/src/main/java/org/apache/tapestry5/spring/TapestrySpringFilter.java?view=markup
>
> http://svn.apache.org/viewvc/tapestry/tapestry5/branches/maint-5-2/tapestry-spring/src/main/java/org/apache/tapestry5/internal/spring/SpringModuleDef.java?view=markup


Think an implementation similar to tapestry-spring would the better
alternative of the two.
And looking at BeanManager the implementation would not be as different than
from tapestry-spring.
http://docs.jboss.org/cdi/api/1.0/javax/enterprise/inject/spi/BeanManager.html

It's not completely clear to me what the difference is between an
ObjectProvider and ObjectCreator.
Tried debugging tapestry-spring and the cant' see the ObjectCreator is used
for SpringBeanServiceDef's at all.
Both implementations lookup beans in springs applicationcontext, but only
the ObjectProvider actually locates them.

What do tapestry do with the beans after the're provided - are they cached
? (they seem to be cached as the provider is not called again)

And what about scopes? Again tapestry-spring give default(singleton) scope
to all, but can't see getServiceScope is called while debugging.

>
>
>  I've seen long discussions on the list about tapestry and jsr 299 and 330.
>> Believe Igor has committed something for 330. Don't know if there are any
>> plans for jsr 299 though (as portable extension?).
>>
>
> I don't know of any plans, but I'd love to see it. I just don't try to do
> that myself due to lack of time . . . :(
>

Yes, have the same problem - but will try to give it a go once I get my head
around it. Not too familiar with tapestry internals though...

Weld is bundled with glassfish so the BeanManager should be available from
jndi by the time tapestry starts up and loads the tapestry-cdi module.
(In other environments it's possible to bootstrap manually - or use the weld
servlet listener, org.jboss.weld.environment.servlet.Listener)

Thoughts?

>
> --
> Thiago H. de Paula Figueiredo
> Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
> and instructor
> Owner, Ars Machina Tecnologia da Informação Ltda.
> http://www.arsmachina.com.br
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to