[JBoss Seam] - Re: Session context variable missing
by petemuir
"gmarcus" wrote : Is it true that during injection, SEAM will lookup a named component in all scopes based on the well known precedence (STATELESS, EVENT, PAGE, ...)?
Yes
anonymous wrote : I thought that by default, SEAM will outject to the same scope that it injected from. My thinking was that for every function call on my SFSB, SEAM would inject currentCategory from the SESSION, let it be changed by the SFSB and outject it back to the SESSION.
No, it outjects into the specified scope, or if unspecified, the scope of the parent component. @In and @Out have no effect on the operation of each other.
anonymous wrote :
| | ...
| | @DataModel
| | private List<Category> categories;
| |
| | @DataModelSelection
| | private Category selectedCategory;
| |
| | ...
| |
| | @Create
| | public String init()
| | {
| | if (currentCategory == null)
| | {
| | currentCategory = (Category) em.createNamedQuery("Category.findRoot").getSingleResult();
| | }
| | return "success";
| | }
| |
| | ...
| |
| | public void select()
| | {
| | currentCategory = selectedCategory;
| | return;
| | }
| |
| | ...
| |
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053297#4053297
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053297
18Â years, 10Â months
[JBoss Seam] - Trouble with SeamTest when stateful session bean is annotate
by tuxzilla
I couldn't get the SFSB to instantiate correctly in my SeamTest because the component startup was invoked before the embedded ejb container startup. Here is the error message:
anonymous wrote :
| org.jboss.seam.InstantiationException: Could not instantiate Seam component: companyList
| at org.jboss.seam.Component.newInstance(Component.java:1740)
| at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
| at org.jboss.seam.contexts.Lifecycle.endInitialization(Lifecycle.java:145)
| at org.jboss.seam.init.Initialization.init(Initialization.java:504)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:701)
| Caused by: javax.naming.NamingException: Local server is not initialized
| at org.jnp.interfaces.LocalOnlyContextFactory.getInitialContext(LocalOnlyContextFactory.java:45)
| at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
| at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
| at javax.naming.InitialContext.init(InitialContext.java:223)
| at javax.naming.InitialContext.(InitialContext.java:197)
| at org.jboss.seam.util.Naming.getInitialContext(Naming.java:35)
| at org.jboss.seam.util.Naming.getInitialContext(Naming.java:47)
| at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
| at org.jboss.seam.Component.instantiate(Component.java:1093)
| at org.jboss.seam.Component.newInstance(Component.java:1736)
|
|
Here is the log message after I disabled the @Startup annotation of the SFSB:
anonymous wrote :
| 15:31:44,187 INFO [Lifecycle] starting up: org.jboss.seam.servlet.exceptionFilter
| 15:31:44,187 INFO [Lifecycle] starting up: org.jboss.seam.ioc.spring.springELResolver
| 15:31:44,218 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource
| 15:31:44,218 INFO [Lifecycle] starting up: org.jboss.seam.servlet.redirectFilter
| 15:31:44,218 INFO [Lifecycle] starting up: org.jboss.seam.core.ejb
| 15:31:44,218 INFO [Ejb] starting the embedded EJB container
| 15:31:45,328 WARN [BeanSchemaBinding] You should use the 2.0 version of the Microcontainer xml. xmlns='urn:jboss:bean-deployer:2.0'
| ...
Is there a way I can postpone the startup of this EJB while keeping the @Startup annotation?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053296#4053296
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053296
18Â years, 10Â months
[Installation, Configuration & Deployment] - Re: Setteing the http port from (8080 ... the default value)
by ataud
I need to configure 2 virtual hosts (mydomain1.com and mydomain2.com).
I write in JBOSS_HOME/server/default/deploy/jboss-web.deployer/server.xml:
| ....
| <Connector port="80" address="the IP adress" ...protocol="HTTP/1.1".../>
| <Connector port="8009" .... protocol="AJP/1.3"... />
| <Enginee name="jboss.web" defaultHost="mydomain1.com">
| <Realm className="org.jboss.web.tomcat.security.JBossSecurityMgrRealm".../>
|
| <Host name="mydomain1.com" autoDeploy="false"
| deployOnStartup="false" deployXML="false"
| configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">
| <Alias>www.mydomain1.com</Alias>
| <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
| cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
| transactionManagerObjectName="jboss:service=TransactionManager" />
| </Host>
|
| <Host name="mydomain2.com" autoDeploy="false"
| deployOnStartup="false" deployXML="false"
| configClass="org.jboss.web.tomcat.security.config.JBossContextConfig">
| <Alias>www.mydomain2.com</Alias>
| <Valve className="org.jboss.web.tomcat.service.jca.CachedConnectionValve"
| cachedConnectionManagerObjectName="jboss.jca:service=CachedConnectionManager"
| transactionManagerObjectName="jboss:service=TransactionManager" />
| </Host>
|
| </Engine>
|
I deploy mydomain1.war containing:
| - jboss-web.xml
| <jboss-web>
| <context-root>/mydomain1</context-root>
| <virtual-host>mydomain1.com</virtual-host>
| </jboss-web>
|
- index.jsp
| ...
| <body>
| wellcome to mydomain1.com
| </body>
| ...
|
I deploy mydomain2.war containing:
- jboss-web.xml
| <jboss-web>
| <context-root>/mydomain2</context-root>
| <virtual-host>mydomain2.com</virtual-host>
| </jboss-web>
|
- index.jsp
| ..
| <body>
| wellcome to mydomain2.com
| </body>
| ...
|
But when I populate www.mydomain1.com and www.mydomain2.com in the browser I obtain an empty page !!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4053289#4053289
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4053289
18Â years, 10Â months