[JBoss Seam] - Re: Planning to remove @Begin(id=..)? Help Needed!
by raffaele.camanzo
anonymous wrote :
| This feature is not really "official" yet because it's not documented or demonstrated in any of the example apps.
| It's actually part of the groundwork we needed to do for the upcoming JBossWS/Seam integration in 1.3.0.
|
Thank you Shane for the preview, I tried it out on Seam 1.2.1GA modifying my test case, unfortunately I did not find a way to keep alive a long running conversation using that stuff.
Anyway, you did not release it officially and then I don't want to bother you with my results, if you are interested I will post you the details.
anonymous wrote :
| I don't know why you just spent so many words on explaining me the current behavior.
| I know what the current behavior is. I know how it behaved in the test case you submitted. I'm happy with it.
|
Gavin, I spent all those words for two reasons: the former is to have a feedback from you on the way I use, understand (or misunderstand) the framework
the latter is to understand if what I'm doing with Seam is reasonable and into the bounds of the Seam philosophy.
But probably I'm not, or not completely and about this I would like to make you a(nother) question, or better, I try to tell you what I would reach:
my application is really near to the Seam's workspace management, but this feature does not give me enough access to the conversation's list.
I should wrap the conversationsList to render it as a tabbed view, unfortunately I cannot because I have to group sub-lists of conversations, indeed we have two levels of tabs,
in the lower there are the actions, one per conversation, in the upper there is a logical grouping (tabs are grouped for functionality);
then I should have a way to access and switch to a conversation both if the user asks for a particular functionality (the lower tab label)
and if the user asks for another group of tabs (the upper tab label, switching to the 'opened' one in that group).
In my app there's the same logical error you found in the test case: trying to switch to another conversation from an already long running, but this is quite simple to solve, I guess:
I avoid to propagate the current conversation (the current tab viewed) when a user asks for a new service (from the menu, new open tab)
or when refers to an already opened (selecting a tab label).
I think this happens in conversationsList/conversationsStack stuff in the workspace management example.
There's another little big problem with the conversationsList or conversationsStack: I tried to render it as an unordered list (what's behind the tabbed view) and the list provided
changes everytime I switch from a conversation to another; this for a tabbed view of services is not reasonable.
This is why I keep track of the conversations (storing the conversation identifier, passed as parameter to the related tab label link) to create the two levels tabbed view
and use explicit conversation ids.
Hope you have the time to read this and to give me advice about.
Regards,
Raffaele Camanzo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032570#4032570
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032570
19Â years
[JBoss Seam] - Seam and events (really dumb one)
by viniciuscarvalho
Ok, this might the the dumbest question I've ever asked. But I'm really stuck on this.
I have other seam projects, (none using facelets tough) and they work fine.
So I have this project: I used seam-gen to create the artifacts. I have one simple SLSB
| @Stateless
| @Name("customerManager")
| public class CustomerManagerBean implements CustomerManager {
|
| @In @Out
| private Customer customer
| @PersistenceContext(unitName="CustomerContext")
| private EntityManager em;
|
| public String register() {
| em.persist(customer);
| return null;
| }
| }
|
| @Name("customer")
| @Entity
| public class Customer implements Serializable{
| @NotNull
| private String getName()...
| }
|
| and finally my xhtml page:
|
| <ui:define name="content">
| <h:form>
| <h:messages globalOnly="true"/>
| <s:decorate template="edit.xhtml">
| <ui:define name="label">Name </ui:define> : <h:inputText value="#{customer.name}" size="15" required="true"/><br/>
| </s:decorate>
| <s:decorate template="edit.xhtml">
| <ui:define name="label">Phone </ui:define>: <h:inputText value="#{customer.phone}" size="8"/><br/>
| </s:decorate>
| <h:commandButton type="submit" value="Register" action="#{customerManager.register}"/>
| </h:form>
| </ui:define>
|
As you can see, simpler is impossible. Hitting the Register command button does not trigger the method...
I'm really embarrassed of how could a simple thing like this get me stuck... So I come here to call for help :(
Anyone have a clue of what's missing?
Best regards, and really sorry about the dumb question
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032562#4032562
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032562
19Â years
[JBoss Seam] - SEAM don't can find session bean !!
by JohnBat26
Hello.
I have next problem with SEAM (1.2.1.GA)
-------------------------------
My config:
JSF: jsf-1.2_04-b10-p01
SEAM: 1.2.1.GA
JBoss: 4.0.5.GA
OS: Gentoo Linux (AMD64)
VM: BEA JRockIt 6.0 and Sun JVM 6.0
---------------------------------
I created one entity (User) and one Session Bean (UserActionBean).
This is my ejb-jar.xml:
---------------------------
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
version="3.0">
<![CDATA[No Description.]]>
<display-name>Generated by AndroMDA EJB3 Cartridge</display-name>
<enterprise-beans>
<![CDATA[
]]>
<ejb-name>UserActionBean</ejb-name>
org.it.itMail.service.UserActionRemote
org.it.itMail.service.UserActionLocal
<ejb-class>org.it.itMail.service.UserActionBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
<![CDATA[
]]>
<ejb-name>UserDao</ejb-name>
org.it.itMail.domain.UserDao
<ejb-class>org.it.itMail.domain.UserDaoImpl</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
<assembly-descriptor>
<interceptor-binding>
<ejb-name>*</ejb-name>
<interceptor-class>org.jboss.seam.ejb.SeamInterceptor</interceptor-class>
</interceptor-binding>
</assembly-descriptor>
</ejb-jar>
---------------------------
When I start JBoss, EJB3Deployer install this two component properly. So they available from JNDI.
This part log from JBoss:
-------------------------------
01:50:13,292 INFO [JmxKernelAbstraction] jboss.jca:name=jdbc/itMail,service=DataSourceBinding
01:50:13,473 INFO [Version] Hibernate EntityManager 3.2.0.GA
01:50:13,489 INFO [Version] Hibernate Annotations 3.2.0.GA
01:50:13,508 INFO [Environment] Hibernate 3.2.0.ga
01:50:13,514 INFO [Environment] hibernate.properties not found
01:50:13,516 INFO [Environment] Bytecode provider name : javassist
01:50:13,521 INFO [Environment] using JDK 1.4 java.sql.Timestamp handling
01:50:13,634 INFO [Ejb3Configuration] found EJB3 Entity bean: org.it.itMail.domain.User
01:50:13,642 WARN [Ejb3Configuration] Persistence provider caller does not implements the EJB3 spec correctly. PersistenceUnitInfo.getNewTempClassLoader() is null.
01:50:13,698 INFO [Configuration] Reading mappings from resource: META-INF/orm.xml
01:50:13,701 INFO [Ejb3Configuration] [PersistenceUnit: itMail] no META-INF/orm.xml found
01:50:13,893 INFO [AnnotationBinder] Binding entity from annotated class: org.it.itMail.domain.User
01:50:13,915 INFO [QueryBinder] Binding Named query: User.findAll => select user from User AS user
01:50:13,968 INFO [EntityBinder] Bind entity org.it.itMail.domain.User on table USERS
01:50:14,345 INFO [ConnectionProviderFactory] Initializing connection provider: org.hibernate.ejb.connection.InjectedDataSourceConnectionProvider
01:50:14,348 INFO [InjectedDataSourceConnectionProvider] Using provided datasource
01:50:14,700 INFO [SettingsFactory] RDBMS: MySQL, version: 5.0.34-log
01:50:14,700 INFO [SettingsFactory] JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.4 ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $ )
01:50:14,729 INFO [Dialect] Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
01:50:14,737 INFO [TransactionFactoryFactory] Transaction strategy: org.hibernate.ejb.transaction.JoinableCMTTransactionFactory
01:50:14,740 INFO [TransactionManagerLookupFactory] instantiating TransactionManagerLookup: org.hibernate.transaction.JBossTransactionManagerLookup
01:50:14,742 INFO [TransactionManagerLookupFactory] instantiated TransactionManagerLookup
01:50:14,742 INFO [SettingsFactory] Automatic flush during beforeCompletion(): disabled
01:50:14,742 INFO [SettingsFactory] Automatic session close at end of transaction: disabled
01:50:14,743 INFO [SettingsFactory] JDBC batch size: 15
01:50:14,743 INFO [SettingsFactory] JDBC batch updates for versioned data: disabled
01:50:14,744 INFO [SettingsFactory] Scrollable result sets: enabled
01:50:14,745 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): enabled
01:50:14,745 INFO [SettingsFactory] Connection release mode: auto
01:50:14,746 INFO [SettingsFactory] Maximum outer join fetch depth: 2
01:50:14,746 INFO [SettingsFactory] Default batch fetch size: 1
01:50:14,746 INFO [SettingsFactory] Generate SQL with comments: disabled
01:50:14,746 INFO [SettingsFactory] Order SQL updates by primary key: disabled
01:50:14,747 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
01:50:14,749 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
01:50:14,750 INFO [SettingsFactory] Query language substitutions: {}
01:50:14,750 INFO [SettingsFactory] JPA-QL strict compliance: enabled
01:50:14,750 INFO [SettingsFactory] Second-level cache: enabled
01:50:14,750 INFO [SettingsFactory] Query cache: disabled
01:50:14,751 INFO [SettingsFactory] Cache provider: org.hibernate.cache.HashtableCacheProvider
01:50:14,752 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
01:50:14,752 INFO [SettingsFactory] Structured second-level cache entries: disabled
01:50:14,759 INFO [SettingsFactory] Statistics: disabled
01:50:14,759 INFO [SettingsFactory] Deleted entity synthetic identifier rollback: disabled
01:50:14,760 INFO [SettingsFactory] Default entity-mode: pojo
01:50:14,808 INFO [SessionFactoryImpl] building session factory
01:50:15,201 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no JNDI name configured
01:50:15,206 INFO [SchemaUpdate] Running hbm2ddl schema update
01:50:15,206 INFO [SchemaUpdate] fetching database metadata
01:50:15,209 INFO [SchemaUpdate] updating schema
01:50:15,300 INFO [TableMetadata] table found: itMail.USERS
01:50:15,300 INFO [TableMetadata] columns: [id, first_name, last_name]
01:50:15,300 INFO [TableMetadata] foreign keys: []
01:50:15,300 INFO [TableMetadata] indexes: [primary]
01:50:15,307 INFO [SchemaUpdate] schema update complete
01:50:15,314 INFO [NamingHelper] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces}
01:50:15,867 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserActionBean,service=EJB3 with dependencies:
01:50:15,867 INFO [JmxKernelAbstraction] persistence.units:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,unitName=itMail
01:50:15,867 INFO [JmxKernelAbstraction] jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserDao,service=EJB3
01:50:15,869 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserDao,service=EJB3 with dependencies:
01:50:15,869 INFO [JmxKernelAbstraction] persistence.units:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,unitName=itMail
01:50:16,144 INFO [EJBContainer] STARTED EJB: org.it.itMail.domain.UserDaoImpl ejbName: UserDao
01:50:16,211 INFO [EJBContainer] STARTED EJB: org.it.itMail.service.UserActionBean ejbName: UserActionBean
01:50:16,256 INFO [SimpleStatefulCache] Initializing SimpleStatefulCache with maxSize: 100000 timeout: 300 for jboss.j2ee:ear=itMail-0.1.0-SNAPSHOT.ear,jar=itMail-core-0.1.0-SNAPSHOT.jar,name=UserActionBean,service=EJB3
01:50:16,259 INFO [EJB3Deployer] Deployed: file:/home/jee/jboss-4.0.5.GA/server/default/deploy/itMail-0.1.0-SNAPSHOT.ear/itMail-core-0.1.0-SNAPSHOT.jar
01:50:16,261 INFO [TomcatDeployer] deploy, ctxPath=/itMail, warUrl=.../tmp/deploy/tmp46547itMail-web-0.1.0-SNAPSHOT-exp.war/
-------------------------------------------
When SEAM deploy this components:
-------------------------------
...
1:50:18,911 INFO [Component] Component: user, scope: EVENT, type: ENTITY_BEAN, class: org.it.itMail.domain.User
01:50:18,917 INFO [Component] Component: userAction, scope: CONVERSATION, type: STATEFUL_SESSION_BEAN, class: org.it.itMail.service.UserActionBean, JNDI: itMail-0.1.0-SNAPSHOT/UserActionBean/local
01:50:18,933 INFO [Lifecycle] starting up: org.jboss.seam.servlet.multipartFilter
01:50:18,934 INFO [Lifecycle] starting up: org.jboss.seam.servlet.exceptionFilter
01:50:18,937 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.dynamicImageResource
01:50:18,938 INFO [Lifecycle] starting up: org.jboss.seam.servlet.redirectFilter
01:50:18,938 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource
01:50:18,942 INFO [Initialization] done initializing Seam
01:50
-------------------------------
When all deployed OK. But when I get page from browser, show this error:
-----------------------------------
1:50:20,319 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 26s:453ms
01:50:46,851 INFO [ServletCacheAdministrator] Created new instance of ServletCacheAdministrator
01:50:46,852 INFO [ServletCacheAdministrator] Created new application-scoped cache at key: __oscache_cache
01:50:46,933 ERROR [STDERR] 29.03.2007 1:50:46 com.sun.faces.lifecycle.ELResolverInitPhaseListener populateFacesELResolverForJsp
INFO: JSF1027: [it-mail] The ELResolvers for JSF were not registered with the JSP container.
01:50:46,967 INFO [Lifecycle] starting up: org.jboss.seam.security.identity
01:50:47,400 ERROR [SeamPhaseListener] uncaught exception
java.lang.IllegalArgumentException: value of context variable is not an instance of the component bound to the context variable: userAction
at org.jboss.seam.Component.getInstance(Component.java:1655)
at org.jboss.seam.Component.getInstance(Component.java:1610)
at org.jboss.seam.Component.getInstance(Component.java:1604)
at org.jboss.seam.jsf.SeamELResolver.getValue(SeamELResolver.java:49)
at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:68)
at com.sun.el.parser.AstValue.getTarget(AstValue.java:63)
at com.sun.el.parser.AstValue.invoke(AstValue.java:153)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
at com.sun.faces.application.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
at org.jboss.seam.actionparam.ActionParamBindingHelper.invokeTheExpression(ActionParamBindingHelper.java:58)
at org.jboss.seam.actionparam.ActionParamMethodBinding.invoke(ActionParamMethodBinding.java:75)
at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:148)
at org.jboss.seam.pages.Page.enter(Page.java:229)
at org.jboss.seam.core.Pages.enterPage(Pages.java:276)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.enterPage(AbstractSeamPhaseListener.java:276)
at org.jboss.seam.jsf.AbstractSeamPhaseListener.beforeRender(AbstractSeamPhaseListener.java:214)
at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:56)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63)
at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49)
at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
-----------------------------------
So, SEAM don't can find properly deployed session bean!!!
What I do wrong ?
Very wait answer....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4032560#4032560
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4032560
19Â years