Cooperation with @Inject of services and TX for JSF

UI Components for JSF
Post Reply
alero
Posts: 3
Joined: 21 Jul 2010, 23:11

30 Aug 2010, 00:07

Hi there I am developing a simlification set of frameworks and am currently doing the part for JSF and my favourite JSF extension Primefaces.
I need some help (or perhaps even cooperation) on how to make this zero config with JSF or perhaps if you have an interrest automate it all into PrimeFaces.

So what is it:
1. An Injection Container based on JSR-330. Connected to JSF via InjectionProvider.
2. An TransactionManager that abstracts JPA2 and JDBC currently, also inteconnects the two so a developer can use both JPA and JDBC in the same transaction. Uses the EJB annotations for transaction as nothing good exists. Has a "OpenTransactionInWeb" implementation for Filters.
3. A JUnit runner to simpler do transactional tests.

In short:
See the project
http://code.google.com/p/web-showcases/ ... unk/inject

- The web.xml (this is the area i would like to get to zero config)
http://code.google.com/p/web-showcases/ ... NF/web.xml
- A JSF bean with Injected resource (nothing imported from the Container)
http://code.google.com/p/web-showcases/ ... bBean.java

If you would like to know more or actually do this please contact me at robert.alexandersson at gmail.com

best regards Robert Alexandersson

alero
Posts: 3
Joined: 21 Jul 2010, 23:11

30 Aug 2010, 00:20

I forgot to say why :)

This code I would love to be able to remove (perhaps by some sort of auto-discovery):

Code: Select all

   <context-param>
        <param-name>com.sun.faces.injectionProvider</param-name>
        <param-value>org.hrodberaht.webexample.web.ApplicationJSFResolverImpl</param-value>
    </context-param>

    <filter>
        <filter-name>TransactionFilter</filter-name>
        <filter-class>com.hrodberaht.inject.extension.transaction.web.OpenTransactionInViewFilter</filter-class>
        <init-param>
            <param-name>transactionManagerResolver</param-name>
            <param-value>org.hrodberaht.webexample.web.ApplicationJSFResolverImpl</param-value>
        </init-param>
    </filter>

    <filter-mapping>
        <filter-name>TransactionFilter</filter-name>
        <url-pattern>*.xhtml</url-pattern>
    </filter-mapping>

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 53 guests