[JBoss Seam] - Injection and disinjection control
by msystems
I have two Java Beans, Bean A (scope: session) and Bean B (scope: event). Bean A is injected
into Bean B. E.g.
Class A {
...
...
...
}
Class B {
protected Object var;
@In(value = "ASession", create = true)
void setVar(Object var) {
this.var = var;
do something !
...
...
}
void doSomething1() {
}
void doSomething2() {
}
void doSomething3() {
}
...
...
}
Each method invocation on Bean B results in an injection and disinjection.
In mine particularly case it's totally unnecessary to inject and disinject at each method invocation. I only need
an injection when an instance of class B is created.
Because of the current design of Seam my setVar() method is executed between 500 - 5000 (depends on the situation)
times by the BijectionInterceptor.bijectTargetComponent() and the state of the injected object is the same each time.
It would be very nice, if I could control the injection and disinjection, e.g.
@In(oneInjection = true, disinjection = false, value = "ASession", create = true)
void setVar(Object var) {
this.var = var;
do something !
...
...
}
oneInjection = true // only inject one time.
disinjection = false // don't disinject
Could Seam support something like that?
Regards
Kenneth
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988620#3988620
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988620
19Â years, 5Â months
[JBoss Seam] - [DVD example] how to directly go back to the checkout page a
by ellenzhao
I'm trying to do this based on the DVD example version 1.1.0 CR 1: A new user comes in and chooses a lot of DVDs. The checkout was blocked since he hasn't logged in yet. Now he starts registration and hopefully after the "registration succeeded!" confirmation he can go directly back to the checkout page.
In the current code, both the newuser and checkout conversations are already marked as nested. After the registration during checkout, the user would be directed to homepage but not the checkout page. The DVDs chosen before are still there though. But directly go back to checkout page would be less confusing to a new shopper. How many possibilities to achieve this with Seam?
By the way, the current signature of the saveUser() in the EditCustomer.java ispublic String saveUser(). I guess it could also be public void saveUser() since the pageflow for registration is managed by the jpdl configuration but not the navigation.xml. There is no <from-outcome>success</from-outcome> entry in the navigation.xml. So return "success" in the try block has no effect.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988619#3988619
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988619
19Â years, 5Â months
JBoss & Tomcat
by Mohsen Pahlevanzadeh
Dear all,I have delivered a server from my boss,It has many
sites,PHP,JSP & etc.
When i see a site same acs.takfab.ir in httpd.conf ,It has a
DocumentRoot that it has a one file : index.html
index.html has a JavaScript code that it is redirected to
'http://acs.takfab.ir:8080/acs'
Now i wanna know main DocumentRoot of this site,I have a tomcat
directory & JBoss directory.
Please help me...
Yours,Mohsen
19Â years, 5Â months
[JBoss jBPM] - jboss-4.0.5.GA gets into a loop after calling http://localho
by zauberlehrling
Hi,
I've installed jboss-4.0.5.GA together with jbpm-3.1.2.
For the installation I made two modifications:
1) I commented out the libraries in the directory lib/dom4j and the file jaxen-*.jar in the build file jbpm-starters-kit-3.1.2/jbpm/build.deploy.xml
<!-- ============= -->
| <!-- === BUILD === -->
| <!-- ============= -->
| <target name="build.webapp" description="builds jbpm.war">
| <ant antfile="build.xml" target="build.webapp" />
| <mkdir dir="build/jbpm.war.dir" />
| <copy todir="build/jbpm.war.dir">
| <fileset dir="src/resources/jbpm.war" />
| </copy>
| <copy todir="build/jbpm.war.dir/WEB-INF/lib">
| <fileset dir="build" includes="jbpm-webapp-${jbpm.version}.jar" />
| <fileset dir="lib/jsf" includes="*.jar" />
| <!--
| <fileset dir="lib/dom4j" includes="*.jar" />
| <fileset dir="lib/hibernate" includes="jaxen-*.jar" />
| -->
| <fileset dir="lib/commons" includes="commons-digester-*.jar, commons-beanutils-*.jar, commons-fileupload-*.jar" />
| </copy>
| <jar destfile="build/jbpm.war">
| <fileset dir="build/jbpm.war.dir" />
| </jar>
| </target>
2) I made modifications in the file hibernate.cfg.xml, which is part of the jar-file jbpm.sar.cfg.jar because of my mysql database. The file jbpm.sar.cfg.jar resides in the directory jboss-4.0.5.GA/server/jbpm/deploy/jbpm.sar
<property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>
| <property name="hibernate.connection.datasource">java:/MySqlDS</property>
| <property name="hibernate.cache.use_second_level_cache">false</property>
| <property name="hibernate.cache.use_query_cache">false</property>
Afterwards I was able to start the application server with the command
jboss-4.0.5.GA/bin/run.sh -c jbpm
Furthermore I deployed a simple process archive with the following ant task:
| <target name="deploy.par"
| description="deploys the process archive myprocess.par">
| <taskdef name="deploypar"
| classname="org.jbpm.ant.DeployProcessTask"
| classpathref="lib" />
| <deploypar process="${deploy.dir}/myprocess.par"
| cfg="${src.dir}/main/config/hibernate.cfg.xml"/>
| </target>
I found on the following addresses information about my process:
http://localhost:8080/jbpm/faces/home.jsp
http://localhost:8080/jbpm/faces/admin.jsp
http://localhost:8080/jbpm/faces/monitor.jsp
I do not know why there is the part "faces" in the middle of these addresses.
Furthermore the application server raises an exception and gets into a loop
when I call the address
http://localhost:8080/jbpm/faces
In the console I can see:
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
| at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
| at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
| at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
| at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
| at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
| at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:415)
| at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
| ...
|
You can see the block beginning with javax.faces.webapp.FacesServlet.service(FacesServlet.java:95) up to
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300) twice in the code above. It comes again and again.
What is wrong?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988615#3988615
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988615
19Â years, 5Â months