Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9217939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:44:48+00:00 2026-06-18T02:44:48+00:00

Most recent project I working where I trying to use Spring (3.1.1.RELEASE) Managed Hibernate

  • 0

Most recent project I working where I trying to use Spring (3.1.1.RELEASE) Managed Hibernate Session into Seam (2.3.0.Final).

In JBoss Seam Documentation where they explain How to use Seam Managed Hibernate Session in Spring. But our requirement is invert than the documentation.

I got another solution Using Spring PlatformTransactionManagement but my requirement is use Spring Managed Hibernate Session in Seam. I don’t want to use Seam manage Hibernate Session/Hibernate Entity Manager/Transaction. Only want to use Seam manage dependency injection to inject Spring bean into Seam manage bean via seam @In not Spring @Autowire.

If anybody faces such type of challenge please either help to configure Seam components.xml & Spring applicationContext.xml or provide me guide line to overcome this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:44:50+00:00Added an answer on June 18, 2026 at 2:44 am

    First Configure applicationContext.xml as usually you configured:

    <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
        <!-- hibernate Properties Here -->                     
    </bean>
    <bean id="transactionManager"
        class="org.springframework.orm.hibernate4.HibernateTransactionManager">
        <property name="sessionFactory" ref="sessionFactory" />
    </bean>
    <tx:annotation-driven/>
    

    Then Configure components.xml as following:

    <core:init debug="true" transaction-management-enabled="true" />
    <spring:context-loader config-locations="classpath*:/META-INF/spring/applicationContext.xml"/>
    <core:manager concurrent-request-timeout="500" conversation-timeout="120000" conversation-id-parameter="cid" parent-conversation-id-parameter="pid" />
    <persistence:managed-hibernate-session name="hibernateSession" auto-create="true" session-factory="#{sessionFactory}"/>
    <spring:spring-transaction platform-transaction-manager="#{transactionManager}"/>
    

    Its very much easy to interact Spring(3.1.1.RELEASE) with Seam (2.3.0.Final) but never forget to configure web.xml for seam.

    <listener>
        <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
    </listener>
    
    <listener>
        <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
    </listener>
    
    <servlet>
        <servlet-name>Seam Resource Servlet</servlet-name>
        <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>Seam Resource Servlet</servlet-name>
        <url-pattern>/resource/*</url-pattern>
    </servlet-mapping>
    
    <filter>
        <filter-name>Seam Filter</filter-name>
        <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
    </filter>
    <filter-mapping>
        <filter-name>Seam Filter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>
    
    <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.xhtml</url-pattern>
    </servlet-mapping>
    
    <login-config>
        <auth-method>BASIC</auth-method>
    </login-config>
    
    <session-config>
        <session-timeout>10</session-timeout>
    </session-config>
    
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    

    For facelets your should add variable resolver in faces-config.xml

    <application>
        <variable-resolver>org.springframework.web.jsf.DelegatingVariableResolver</variable-resolver>
    </application>
    

    Better to download Seam-2.3.0.Final. Uzip it, inside examples\spring\ folder you will got your desired configuration

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying implement a most recent widget into my tumblr post. So far,
I'm working on a project that is pretty simple, but the most recent version
I am working on a new project on the most recent version of Symfony
I downloaded the most recent version of Android for Linux (android-sdk_r05-linux_86.tgz). I was trying
I am trying to find the most recent record based on a date field.
I'm trying to learn how to use the wxPython wxScrolledWindow class for a project,
Okay, so I'm working with Couchbase 2.0 and the most recent .NET client. Basically
I am working on a project where I want to use a C++ library
A project I'm working on requires the use of jQuery on customers' Web pages.
I am working on a bioinformatics project and trying to run a module named

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.