1 2 Previous Next 20 Replies Latest reply on May 15, 2007 4:57 PM by hsiung Go to original post
      • 15. Re: seam cannot reference EJB, why?
        hsiung

        here is the startup log in which Seam scans the ejb jar:

        20:03:09,933 INFO [ServletContextListener] Welcome to Seam 1.2.1
        20:03:09,953 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-INF/lib/jboss-s
        eam.jar
        20:03:10,033 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/jboss-seam.jar
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/security, package: org.jboss.seam.security, prefix: org.jboss.seam.secur
        ity
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/drools, package: org.jboss.seam.drools, prefix: org.jboss.seam.drools
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/mail, package: org.jboss.seam.mail, prefix: org.jboss.seam.mail
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/web, package: org.jboss.seam.web, prefix: org.jboss.seam.web
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/theme, package: org.jboss.seam.theme, prefix: org.jboss.seam.theme
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/jms, package: org.jboss.seam.jms, prefix: org.jboss.seam.jms
        20:03:10,083 INFO [Initialization] Namespace: http://jboss.com/products/seam/framework, package: org.jboss.seam.framework, prefix: org.jboss.seam.cor
        e.framework
        20:03:10,093 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/jboss-seam-debug.jar
        20:03:10,093 INFO [Scanner] scanning: D:\opt\jboss-4.0.5\server\default\.\tmp\deploy\tmp1148FBN-app.ear-contents\FBN-JSF-exp.war\WEB-INF\classes
        20:03:10,093 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-INF/lib/jboss-s
        eam-ui.jar
        20:03:10,093 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-INF/lib/jboss-s
        eam-debug.jar
        20:03:10,093 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/FBN-EJB.jar
        20:03:10,103 INFO [Initialization] reading /WEB-INF/components.xml
        20:03:10,233 INFO [Initialization] reading jar:file:/D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/jboss-seam.jar!/META-IN
        F/components.xml
        20:03:10,253 INFO [Initialization] reading jar:file:/D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-I
        NF/lib/jboss-seam.jar!/META-INF/components.xml
        20:03:10,253 INFO [Initialization] reading properties from: /seam.properties
        20:03:10,263 INFO [Initialization] reading properties from: /jndi.properties
        20:03:10,263 INFO [Initialization] initializing Seam
        20:03:10,313 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/jboss-seam-debug.jar
        20:03:10,734 INFO [Scanner] scanning: D:\opt\jboss-4.0.5\server\default\.\tmp\deploy\tmp1148FBN-app.ear-contents\FBN-JSF-exp.war\WEB-INF\classes
        20:03:10,744 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-INF/lib/jboss-s
        eam-ui.jar
        20:03:11,084 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-INF/lib/jboss-s
        eam-debug.jar
        20:03:11,094 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/FBN-EJB.jar
        20:03:11,174 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/./tmp/deploy/tmp1148FBN-app.ear-contents/FBN-JSF-exp.war/WEB-INF/lib/jboss-s
        eam.jar
        20:03:12,777 INFO [Scanner] scanning: /D:/opt/jboss-4.0.5/server/default/tmp/deploy/tmp1148FBN-app.ear-contents/jboss-seam.jar
        20:03:13,838 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.security.identity
        20:03:13,888 INFO [Initialization] two components with same name, higher precedence wins: org.jboss.seam.persistence.persistenceProvider
        20:03:13,908 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Init
        20:03:14,048 INFO [Initialization] Installing components...
        20:03:14,069 INFO [Component] Component: org.jboss.seam.core.applicationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Appl
        icationContext
        20:03:14,069 INFO [Component] Component: org.jboss.seam.core.businessProcessContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.
        BusinessProcessContext
        20:03:14,079 INFO [Component] Component: org.jboss.seam.core.conversation, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Conversat
        ion
        20:03:14,649 INFO [Component] Component: org.jboss.seam.core.conversationContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Con
        versationContext
        20:03:14,649 INFO [Component] Component: org.jboss.seam.core.conversationEntries, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Convers
        ationEntries
        20:03:14,649 INFO [Component] Component: org.jboss.seam.core.conversationList, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationL
        ist
        20:03:14,649 INFO [Component] Component: org.jboss.seam.core.conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Conversation
        Stack
        20:03:14,649 INFO [Component] Component: org.jboss.seam.core.eventContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.EventConte
        xt
        20:03:14,659 INFO [Component] Component: org.jboss.seam.core.events, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Events
        20:03:14,659 INFO [Component] Component: org.jboss.seam.core.exceptions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Exceptions
        20:03:14,669 INFO [Component] Component: org.jboss.seam.core.expressions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Expressions
        
        20:03:14,679 INFO [Component] Component: org.jboss.seam.core.facesContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesConte
        xt
        20:03:14,679 INFO [Component] Component: org.jboss.seam.core.facesMessages, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.FacesMes
        sages
        20:03:14,689 INFO [Component] Component: org.jboss.seam.core.facesPage, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.FacesPage
        20:03:14,689 INFO [Component] Component: org.jboss.seam.core.httpError, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.HttpError
        20:03:14,689 INFO [Component] Component: org.jboss.seam.core.image, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Image
        20:03:15,701 INFO [Component] Component: org.jboss.seam.core.interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator
        
        20:03:15,701 INFO [Component] Component: org.jboss.seam.core.isUserInRole, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.IsUserInRo
        le
        20:03:15,701 INFO [Component] Component: org.jboss.seam.core.locale, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Locale
        20:03:15,701 INFO [Component] Component: org.jboss.seam.core.localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelect
        or
        20:03:15,701 INFO [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Manager
        20:03:15,711 INFO [Component] Component: org.jboss.seam.core.messages, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.Messages
        20:03:15,711 INFO [Component] Component: org.jboss.seam.core.methodContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.MethodCon
        text
        20:03:15,731 INFO [Component] Component: org.jboss.seam.core.pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext
        
        20:03:15,731 INFO [Component] Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pages
        20:03:15,741 INFO [Component] Component: org.jboss.seam.core.persistenceContexts, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Pe
        rsistenceContexts
        20:03:15,741 INFO [Component] Component: org.jboss.seam.core.pojoCache, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PojoCache
        20:03:15,751 INFO [Component] Component: org.jboss.seam.core.redirect, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.core.Redirect
        20:03:15,751 INFO [Component] Component: org.jboss.seam.core.renderer, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.ui.facelet.FaceletsRe
        nderer
        20:03:15,751 INFO [Component] Component: org.jboss.seam.core.resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBund
        le
        20:03:15,751 INFO [Component] Component: org.jboss.seam.core.safeActions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SafeActions
        
        20:03:15,751 INFO [Component] Component: org.jboss.seam.core.sessionContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SessionC
        ontext
        20:03:15,761 INFO [Component] Component: org.jboss.seam.core.switcher, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.Switcher
        20:03:15,761 INFO [Component] Component: org.jboss.seam.core.uiComponent, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.UiComponent
        20:03:15,771 INFO [Component] Component: org.jboss.seam.core.userPrincipal, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.UserPrinc
        ipal
        20:03:15,771 INFO [Component] Component: org.jboss.seam.core.validation, scope: EVENT, type: JAVA_BEAN, class: org.jboss.seam.core.Validation
        20:03:15,771 INFO [Component] Component: org.jboss.seam.core.validators, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Validators
        20:03:15,771 INFO [Component] Component: org.jboss.seam.framework.currentDate, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.Cur
        rentDate
        20:03:15,801 INFO [Component] Component: org.jboss.seam.framework.currentDatetime, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework
        .CurrentDatetime
        20:03:15,801 INFO [Component] Component: org.jboss.seam.framework.currentTime, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.framework.Cur
        rentTime
        20:03:15,801 INFO [Component] Component: org.jboss.seam.mail.mailSession, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.mail.MailSession
        
        20:03:15,801 INFO [Component] Component: org.jboss.seam.security.configuration, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.security.C
        onfiguration
        20:03:15,811 INFO [Component] Component: org.jboss.seam.security.identity, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.security.Identity
        20:03:15,831 INFO [Component] Component: org.jboss.seam.servlet.exceptionFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Excep
        tionFilter
        20:03:15,851 INFO [Component] Component: org.jboss.seam.servlet.multipartFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Multi
        partFilter
        20:03:15,851 INFO [Component] Component: org.jboss.seam.servlet.redirectFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.web.Redire
        ctFilter
        20:03:15,851 INFO [Component] Component: org.jboss.seam.theme.theme, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.Theme
        20:03:15,851 INFO [Component] Component: org.jboss.seam.theme.themeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.ThemeSelect
        or
        20:03:15,851 INFO [Component] Component: org.jboss.seam.ui.entityConverter, scope: CONVERSATION, type: JAVA_BEAN, class: org.jboss.seam.ui.EntityConv
        erter
        20:03:15,861 INFO [Component] Component: org.jboss.seam.ui.entityConverterStore, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.ui.EntityConvert
        erStore
        20:03:15,861 INFO [Component] Component: org.jboss.seam.ui.graphicImage.dynamicImageResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.s
        eam.ui.graphicImage.DynamicImageResource
        20:03:15,861 INFO [Component] Component: org.jboss.seam.ui.graphicImage.dynamicImageStore, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.ui.
        graphicImage.DynamicImageStore
        20:03:15,861 INFO [Component] Component: org.jboss.seam.ui.resource.webResource, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.ui.resour
        ce.WebResource
        20:03:15,861 INFO [Lifecycle] starting up: org.jboss.seam.servlet.exceptionFilter
        20:03:15,861 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
        20:03:15,871 INFO [Lifecycle] starting up: org.jboss.seam.servlet.multipartFilter
        20:03:15,871 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource
        20:03:15,871 INFO [Lifecycle] starting up: org.jboss.seam.servlet.redirectFilter
        20:03:15,871 INFO [Initialization] done initializing Seam
        20:03:15,871 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.multipartFilter
        20:03:15,871 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.exceptionFilter
        20:03:15,871 INFO [SeamFilter] Initializing filter: org.jboss.seam.servlet.redirectFilter
        20:03:15,941 INFO [EARDeployer] Started J2EE application: file:/D:/Ideartis/Software-assets/FBN/FBN-app/FBN-app.ear
        20:03:16,282 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
        20:03:16,332 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
        20:03:18,295 INFO [Lifecycle] starting up: org.jboss.seam.security.identity


        • 16. Re: seam cannot reference EJB, why?
          pmuir

          Show the contents of FBN-EJB.jar

          • 17. Re: seam cannot reference EJB, why?
            hsiung

            the content of the ejb jar is

            - jndi-properties
            - META-INF/seam.properties
            - META-INF/ejb-jar.xml
            - META-INF/persistence.xml
            - META-INF/Manifest.mf
            - com/ideartis/jee/fbn/Booking.class
            - com/ideartis/jee/fbn/BookingBean.class
            - com/ideartis/jee/fbn/....


            • 18. Re: seam cannot reference EJB, why?
              hsiung

              I solved the problem now.
              The solution is to use EAR and package the jboss-seam.jar library in the EAR
              instead of deploying JAR and WAR without an EAR and having jboss-seam.jar twice.

              The actual implementation of Seam does NOT support the separation of Web container and EJB container.
              When using Seam, they must be collocated and the deployment must be done with EAR.
              The J2EE spec allows you to deploy EJB and Web artefacts independently but Seam deployment restricts you to EAR deployment only, and moreover forces the EJB and Web part to share the Seam library in a common class loader.
              I hope this is only an implementation issue and not conceptual.
              I didn't found any note on that. Unfortunately.
              This restriction has severe consequences, not only on packaging for a single application server but naturally also on different app servers: Seam does NOT support remote EJB.
              I didn't found any note on that too.
              Perhaps I missed some documentation...

              Bottom line:

              YOU HAVE TO PUT THE JBOSS-SEAM.JAR IN THE EAR FILE AND NOT IN THE JAR AND WAR FILES.

              Cheers
              Alain Hsiung

              • 19. Re: seam cannot reference EJB, why?
                titou09

                Alain, we reached the same point and this is a major point for us to NOT use seam all the way (This is the only problem with seam we see in fact...)

                The problem is the same if you use POJOs instead of EJB3 and try to isolate those POJOs in an utiliy jar deployed in your ear, and keep only the "seam backing beans and view controllers" in the web module (Within its own war classloader..)...
                Also the fact that everything must use the same classloader is really a show stopper, going against the J2EE modules architecture

                If someone knows how to make it working, with only jsf+seam+non-EJB3 POJO+hibernate with all our services/managers/persistent classes in a utility jar, and our view controllers (backing beans) in a war referencing the utility jar (Injecting our services and class model in the view controllers) , just tell us how todo it, i.e. where to put each jar and each config file (seam.properties, components.xml...) and how to configure the classloaders...

                In the meantime, we'll keep using spring+hibernate for our services/managers/persistent classes classes in a utility jar, and jsf+seam on the presentation side in a war, with seam injecting our spring-managed services/managers/persistent classes into seam components. Hibernate being only used in the utility jar and the Hibernate session being injected by spring

                Thx in advance.

                • 20. Re: seam cannot reference EJB, why?
                  hsiung

                  Hi Titou

                  thanks for your enhancement. I love Seam but for me too it is a show stopper if it does not support the REMOTE feature (which includes the ability to deploy Seam components on different J2EE modules).

                  However I have some hope. Christian Bauer from the Seam team told me that the REMOTE feature will be out there in about 2-3 months.

                  On the other hand, JBSEAM-1269 "Support for remotely deployed EJBs" in JIRA has not been assigned yet. Gavin?..

                  I'm wondering if some of you (Seam programers) find the REMOTE feature as important as we do.

                  As you mentioned, Titou, the current Seam implementation goes against the J2EE modules architecture. But it goes also against the current use in the enterprise. In many company I've seen, the EJB containers are highly secured because it runs critical data and algorithms. The Web containers provide a public view for internet users and are placed in the DMZ. A firewall separate the Web and the EJB containers. In other companies there are many EJB containers placed on different machines with different life cycles and owned by different departments and placed on different locations. From the 25 projects in 10 companies I worked for, in Telco, Banks and Insurances, 80% use remote EJBs.

                  1 2 Previous Next