[Messaging, JMS & JBossMQ] - MDB creates itself several times
by gilcesaravila
When a jms client send several messages for the MDB in JBoss, this MDB creates itself several times.
@MessageDriven(mappedName = "jms/Server", activationConfig = {
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
})
/**Server class*/
public class Server implements MessageListener {
public Server() {
System.out.println("INITIALIZED SERVER!");
}
public void onMessage(Message message) {
System.out.println("Message arrived");
}
}
/**Client class*/
public class Client {
...
public Client() {
try {
...
QueueSender sender = queSession.createSender(queue);
TextMessage message = session.createTextMessage("HELLO");
...
//In this point the client sends several messages
for(int i=0; i<10; i++){
sender.send(message);
}
}catch(Exception ex){System.out.println(ex.getMessage());}
}
public static void main(String args[]){
new Client();
}
}
The jboss logger show this:
11:11:16,372 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,382 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,382 INFO [STDOUT] Message arrived
11:11:16,382 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,382 INFO [STDOUT] Message arrived
11:11:16,382 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,382 INFO [STDOUT] Message arrived
11:11:16,382 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,382 INFO [STDOUT] Message arrived
11:11:16,392 INFO [STDOUT] Message arrived
11:11:16,392 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,392 INFO [STDOUT] Message arrived
11:11:16,392 INFO [STDOUT] INITIALIZED SERVER!
11:11:16,392 INFO [STDOUT] Message arrived
11:11:16,432 INFO [STDOUT] Message arrived
11:11:16,432 INFO [STDOUT] Message arrived
11:11:16,493 INFO [STDOUT] Message arrived
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050675#4050675
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050675
18Â years, 10Â months
[JBoss Seam] - Getting selectitems from the generated EntityList object
by amitdk
Read some posts about how one can do this and wasn't satisfied with the solutions. I wanted one that was generic enough and one that used in the JSF read like an OO syntax.
Here's the JSF code:
| <h:selectOneMenu id="division">
| <f:selectItems value="#{entitylist.selectItems[divisionList]}"/>
| </h:selectOneMenu>
|
Next is the entitylist class that allows a parameter to be passed into it. Though EL syntax does not allow for parameter passing, there is technique around it. That technique is posted at http://wiki.apache.org/myfaces/Parameters_In_EL_Functions.
Based on this I created the entitylist class as:
| public class EntityList
| {
| public SelectItems getSelectItems()
| {
| return new SelectItems();
| }
| }
|
Then comes the core piece of code for the SelectItems class:
| import java.lang.reflect.Method;
| import java.util.List;
| import java.util.Vector;
| import javax.faces.model.SelectItem;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.framework.EntityQuery;
|
| @Name("selectitems")
| public class SelectItems<T extends EntityQuery> extends DummyMap
| {
| public SelectItems()
| {
| }
|
| public Object get(Object obj)
| {
| T list = (T) obj;
| return getItems(list.getResultList());
| }
|
| public List<SelectItem> getItems(List entities)
| {
| List<SelectItem> items = new Vector<SelectItem>();
| try
| {
| Method idMthd = null, nameMthd = null;
| for ( int i=0; i<entities.size(); i++ )
| {
| Object entity = entities.get(i);
| // On the first run, initialize reflection methods for object
| if ( idMthd==null )
| {
| Class entityClass = entity.getClass();
| idMthd = entityClass.getMethod("getId", new Class[]{});
| nameMthd = entityClass.getMethod("getName", new Class[]{});
| }
| // Retrieve values on the
| Integer id = (Integer)idMthd.invoke(entity, new Object[]{});
| String name = (String)nameMthd.invoke(entity, new Object[]{});
|
| // Add key information to select item list
| SelectItem item = new SelectItem();
| item.setLabel(name);
| item.setValue(id.toString());
| items.add(item);
| }
| }
| catch (Exception e)
| {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| return items;
| }
| }
|
Note here, the above method expects your domain/entity objects to have a getId() and getName() method. You can change that based upon how your domain objects are designed or add other values on that. I played around with the idea of an interface identifying these methods on the domain objects instead of the reflection route, however I did not want to impose that and felt the solution of reflection worked better. However, I'll leave that up for your judgment.
Hope this will help folks out there that have come across this same issue.
Regards
Amit Karandikar
Sun Certified Architect
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050674#4050674
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050674
18Â years, 10Â months
[JBoss Seam] - Any way to access login-required flag from EL?
by lowecg2004
For improved security, I'd like to output cache control meta tags on pages that require login:
<meta content="no-cache" http-equiv="Pragma" />
| <meta content="no-cache" http-equiv="Cache-Control" />
| <meta content="no-store" http-equiv="Cache-Control" />
| <meta content="max-age=0" http-equiv="Cache-Control" />
| <meta content="1" http-equiv="Expires" />
I'd happily use these on all pages, however they have one negative side effect and that is the browser issues a "Page Expired" message whenever the back button is pressed. For a large part of my site this level of security is not needed and I would prefer the back button to be easy to use.
To that end, is it possible to access Page.isLoginRequired from EL allowing me to write something like the following:
<s:fragment rendered="#{renderContext.loginRequired}">
| <!-- META TAGS HERE -->
| </:fragment>
|
Cheers,
Chris.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050672#4050672
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050672
18Â years, 10Â months
[Beginners Corner] - startup issues
by ecostar
Hi,
I recently downloaded jboss-4.0.4.GA and unzipped the contents to my directory , but upon running the run.sh i get the following errors ..pls help..im in a real fix
[root@localhost bin]# sh run.sh
=========================================================================
JBoss Bootstrap Environment
JBOSS_HOME: /var/swapurstuff/jboss-4.0.4.GA
JAVA: /usr/lib/jvm/java-1.4.2-gcj//bin/java
JAVA_OPTS: -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 - Dsun.rmi.dgc.server.gcInterval=3600000 -Dprogram.name=run.sh
CLASSPATH: /var/swapurstuff/jboss-4.0.4.GA/bin/run.jar:/usr/lib/jvm/java-1.4.2 -gcj//lib/tools.jar
=========================================================================
10:47:24,479 INFO [Server] Starting JBoss (MX MicroKernel)...
10:47:24,480 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBo ss_4_0_4_GA date=200605151000)
10:47:24,482 INFO [Server] Home Dir: /var/swapurstuff/jboss-4.0.4.GA
10:47:24,483 INFO [Server] Home URL: file:/var/swapurstuff/jboss-4.0.4.GA/
10:47:24,483 INFO [Server] Patch URL: null
10:47:24,483 INFO [Server] Server Name: default
10:47:24,484 INFO [Server] Server Home Dir: /var/swapurstuff/jboss-4.0.4.GA/ser ver/default
10:47:24,484 INFO [Server] Server Home URL: file:/var/swapurstuff/jboss-4.0.4.G A/server/default/
10:47:24,484 INFO [Server] Server Log Dir: /var/swapurstuff/jboss-4.0.4.GA/serv er/default/log
10:47:24,485 INFO [Server] Server Temp Dir: /var/swapurstuff/jboss-4.0.4.GA/ser ver/default/tmp
10:47:24,485 INFO [Server] Root Deployment Filename: jboss-service.xml
10:47:27,087 INFO [ServerInfo] Java version: 1.4.2,Free Software Foundation, In c.
10:47:27,088 INFO [ServerInfo] Java VM: GNU libgcj 4.1.0 20060304 (Red Hat 4.1. 0-3),Free Software Foundation, Inc.
10:47:27,088 INFO [ServerInfo] OS-System: Linux 2.6.15-1.2054_FC5,i386
10:47:27,658 WARN [ServiceController] Problem creating service jboss.system:ser vice=MainDeployer
java.lang.NoClassDefFoundError: $Proxy1
at java.lang.Class.initializeClass (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Proxy$ClassFactory.generate (libgcj.so.7)
at java.lang.reflect.Proxy.getProxyClass (libgcj.so.7)
at java.lang.reflect.Proxy.newProxyInstance (libgcj.so.7)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:395)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:349)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:335)
at org.jboss.system.server.ServerConfigLocator.locate (ServerConfigLocator.ja va:42)
at org.jboss.deployment.MainDeployer.createService (MainDeployer.java:471)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate (ServiceMBeanSupp ort.java:261)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle (ServiceMBeanS upport.java:243)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke (ServiceController. java:978)
at $Proxy0.create (Unknown Source)
at org.jboss.system.ServiceController.create (ServiceController.java:331)
at org.jboss.system.ServiceController.create (ServiceController.java:274)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.system.server.ServerImpl.startBootService (ServerImpl.java:564)
at org.jboss.system.server.ServerImpl.doStart (ServerImpl.java:446)
at org.jboss.system.server.ServerImpl.start (ServerImpl.java:367)
at org.jboss.Main.boot (Main.java:201)
at org.jboss.Main$1.run (Main.java:470)
at java.lang.Thread.run (libgcj.so.7)
Caused by: java.lang.ClassNotFoundException: javax.management.MBeanServer
at java.lang.ClassLoader.findClass (libgcj.so.7)
at java.lang.ClassLoader.loadClass (libgcj.so.7)
at java.lang.ClassLoader.loadClass (libgcj.so.7)
at org.jboss.mx.util.MBeanProxyExt$2.loadClass (MBeanProxyExt.java:375)
at java.lang.Class.initializeClass (libgcj.so.7)
...35 more
10:47:28,741 WARN [ServiceController] Problem creating service jboss.system:ser vice=JARDeployer
java.lang.NoClassDefFoundError: $Proxy2
at java.lang.Class.initializeClass (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Proxy$ClassFactory.generate (libgcj.so.7)
at java.lang.reflect.Proxy.getProxyClass (libgcj.so.7)
at java.lang.reflect.Proxy.newProxyInstance (libgcj.so.7)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:395)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:349)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:335)
at org.jboss.system.server.ServerConfigLocator.locate (ServerConfigLocator.ja va:42)
at org.jboss.deployment.SubDeployerSupport.createService (SubDeployerSupport. java:106)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate (ServiceMBeanSupp ort.java:261)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle (ServiceMBeanS upport.java:243)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke (ServiceController. java:978)
at $Proxy0.create (Unknown Source)
at org.jboss.system.ServiceController.create (ServiceController.java:331)
at org.jboss.system.ServiceController.create (ServiceController.java:274)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.system.server.ServerImpl.startBootService (ServerImpl.java:564)
at org.jboss.system.server.ServerImpl.doStart (ServerImpl.java:466)
at org.jboss.system.server.ServerImpl.start (ServerImpl.java:367)
at org.jboss.Main.boot (Main.java:201)
at org.jboss.Main$1.run (Main.java:470)
at java.lang.Thread.run (libgcj.so.7)
Caused by: java.lang.ClassNotFoundException: javax.management.MBeanServer
at java.lang.ClassLoader.findClass (libgcj.so.7)
at java.lang.ClassLoader.loadClass (libgcj.so.7)
at java.lang.ClassLoader.loadClass (libgcj.so.7)
at org.jboss.mx.util.MBeanProxyExt$2.loadClass (MBeanProxyExt.java:375)
at java.lang.Class.initializeClass (libgcj.so.7)
...35 more
10:47:28,025 WARN [ServiceController] Problem creating service jboss.system:ser vice=ServiceDeployer
java.lang.NoClassDefFoundError: $Proxy3
at java.lang.Class.initializeClass (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Field.set (libgcj.so.7)
at java.lang.reflect.Proxy$ClassFactory.generate (libgcj.so.7)
at java.lang.reflect.Proxy.getProxyClass (libgcj.so.7)
at java.lang.reflect.Proxy.newProxyInstance (libgcj.so.7)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:395)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:349)
at org.jboss.mx.util.MBeanProxyExt.create (MBeanProxyExt.java:335)
at org.jboss.system.server.ServerConfigLocator.locate (ServerConfigLocator.ja va:42)
at org.jboss.deployment.SubDeployerSupport.createService (SubDeployerSupport. java:106)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate (ServiceMBeanSupp ort.java:261)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle (ServiceMBeanS upport.java:243)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke (ServiceController. java:978)
at $Proxy0.create (Unknown Source)
at org.jboss.system.ServiceController.create (ServiceController.java:331)
at org.jboss.system.ServiceController.create (ServiceController.java:274)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.system.server.ServerImpl.startBootService (ServerImpl.java:564)
at org.jboss.system.server.ServerImpl.doStart (ServerImpl.java:470)
at org.jboss.system.server.ServerImpl.start (ServerImpl.java:367)
at org.jboss.Main.boot (Main.java:201)
at org.jboss.Main$1.run (Main.java:470)
at java.lang.Thread.run (libgcj.so.7)
Caused by: java.lang.ClassNotFoundException: javax.management.MBeanServer
at java.lang.ClassLoader.findClass (libgcj.so.7)
at java.lang.ClassLoader.loadClass (libgcj.so.7)
at java.lang.ClassLoader.loadClass (libgcj.so.7)
at org.jboss.mx.util.MBeanProxyExt$2.loadClass (MBeanProxyExt.java:375)
at java.lang.Class.initializeClass (libgcj.so.7)
...35 more
10:47:28,137 INFO [Server] Core system initialized
10:47:28,198 ERROR [MainDeployer] Could not make local copy for file:/var/swapur stuff/jboss-4.0.4.GA/server/default/conf/jboss-service.xml
java.lang.NullPointerException
at java.lang.String.startsWith (libgcj.so.7)
at org.jboss.deployment.MainDeployer.inLocalCopyDir (MainDeployer.java:1185)
at org.jboss.deployment.MainDeployer.makeLocalCopy (MainDeployer.java:1159)
at org.jboss.deployment.MainDeployer.init (MainDeployer.java:841)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:798)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:773)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:756)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke (MBeanProxyExt.java:210)
at $Proxy4.deploy (Unknown Source)
at org.jboss.system.server.ServerImpl.doStart (ServerImpl.java:487)
at org.jboss.system.server.ServerImpl.start (ServerImpl.java:367)
at org.jboss.Main.boot (Main.java:201)
at org.jboss.Main$1.run (Main.java:470)
at java.lang.Thread.run (libgcj.so.7)
10:47:28,247 ERROR [MainDeployer] Could not initialise deployment: file:/var/swa purstuff/jboss-4.0.4.GA/server/default/conf/jboss-service.xml
java.lang.NullPointerException
at java.lang.String.startsWith (libgcj.so.7)
at org.jboss.deployment.MainDeployer.inLocalCopyDir (MainDeployer.java:1185)
at org.jboss.deployment.MainDeployer.init (MainDeployer.java:915)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:798)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:773)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:756)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke (MBeanProxyExt.java:210)
at $Proxy4.deploy (Unknown Source)
at org.jboss.system.server.ServerImpl.doStart (ServerImpl.java:487)
at org.jboss.system.server.ServerImpl.start (ServerImpl.java:367)
at org.jboss.Main.boot (Main.java:201)
at org.jboss.Main$1.run (Main.java:470)
at java.lang.Thread.run (libgcj.so.7)
Failed to boot JBoss:
org.jboss.deployment.DeploymentException: Could not initialise deployment: file: /var/swapurstuff/jboss-4.0.4.GA/server/default/conf/jboss-service.xml; - nested throwable: (java.lang.NullPointerException)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException (Dep loymentException.java:53)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:805)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:773)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:756)
at java.lang.reflect.Method.invoke (libgcj.so.7)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke (ReflectedDispatcher.j ava:155)
at org.jboss.mx.server.Invocation.dispatch (Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke (Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke (AbstractMBeanInvoker.java :264)
at org.jboss.mx.server.MBeanServerImpl.invoke (MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke (MBeanProxyExt.java:210)
at $Proxy4.deploy (Unknown Source)
at org.jboss.system.server.ServerImpl.doStart (ServerImpl.java:487)
at org.jboss.system.server.ServerImpl.start (ServerImpl.java:367)
at org.jboss.Main.boot (Main.java:201)
at org.jboss.Main$1.run (Main.java:470)
at java.lang.Thread.run (libgcj.so.7)
Caused by: java.lang.NullPointerException
at java.lang.String.startsWith (libgcj.so.7)
at org.jboss.deployment.MainDeployer.inLocalCopyDir (MainDeployer.java:1185)
at org.jboss.deployment.MainDeployer.init (MainDeployer.java:915)
at org.jboss.deployment.MainDeployer.deploy (MainDeployer.java:798)
...15 more
10:47:28,411 INFO [Server] Runtime shutdown hook called, forceHalt: true
10:47:28,412 INFO [Server] JBoss SHUTDOWN: Undeploying all packages
10:47:28,475 INFO [Server] Shutdown complete
Shutdown complete
Halting VM
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050671#4050671
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050671
18Â years, 10Â months
[JBoss Seam] - Re: Inject a mocked component for integration testing
by lowecg2004
You're welcome. As a general solution to invoking e-mails from test code, I use this:
import java.io.IOException;
|
| import javax.faces.context.FacesContext;
|
| import org.jboss.seam.InterceptionType;
| import org.jboss.seam.ScopeType;
| import org.jboss.seam.annotations.Install;
| import org.jboss.seam.annotations.Intercept;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.ui.facelet.FaceletsRenderer;
|
| import com.sun.facelets.Facelet;
|
| @Scope(ScopeType.STATELESS)
| @Intercept(InterceptionType.NEVER)
| @Name("org.jboss.seam.core.renderer")
| @Install(precedence = Install.MOCK, classDependencies = { "com.sun.facelets.Facelet" })
| public class FaceletsRendererMock extends FaceletsRenderer
| {
| @Override
| protected void renderFacelet(final FacesContext facesContext,
| final Facelet facelet)
| throws IOException
| {
| // This mock will be used when sending e-mails.
|
| // JSF cannot render in testng environment so this mock version does nothing.
| // Despite this, allowing the rest of the Renderer to run will still catch
| // blatently malformed documents (unterminated XML tags for example).
| }
|
| }
Place this somewhere in your test source folder.
Hope this is useful.
Ps. Sorry it took me so long to reply - I'd not checked the "notify me" option on this thread.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050670#4050670
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050670
18Â years, 10Â months
[JBoss Seam] - Post 4.2/Seam 1.3.0.A upgrade: The conversation ended, ...
by lowecg2004
I have a page.xml that starts a long running conversation:
<page>
| <begin-conversation join="true" />
|
| ...
| </page>
This has served me well for some time. After upgrading to Seam 1.3.0.Alpha (CVS 02-06-07), Trinidad 1.2 and Ajax4Jsf 1.1.1 when ever I submitted that page's data I would always get the following messages:
The conversation ended, timed out or was processing another request
| The conversation ended, timed out or was processing another request
I would not be allowed to continue until I had caused a validation error twice, each submission would remove one of the "conversation ended" error messages (!).
The application always works the first time after the app server is started. After that, I get the problem described above.
I have tried the following alternatives to starting a conversation:
<page action="#{conversation.begin}">
| ...
| </page>
|
| and
|
| <page action="#{conversation.begin(true, false)}">
| ...
| </page>
|
| and
|
| <page action="#{orderQuantityBean.startConversation}">
| ...
| </page>
|
| @Name("orderQuantityBean")
| @Stateful
| @Scope(ScopeType.EVENT)
| public class OrderQuantityBeanHome implements OrderQuantityBean, Serializable {
| ...
|
| @Begin(join=true)
| public String startConversation() {
| return null;
| }
| }
All result in the same messages.
Moving the begin-conversation into a navigation rule resolves my particular problem:
<page>
| <navigation>
| <rule if-outcome="get-quote" >
| <begin-conversation join="true" />
| <render view-id="/public/order-quantity.xhtml" />
| </rule>
| </navigation>
| </page>
I am aware that certain situations have been tightened up in the latest Seam and JBoss versions. I am also aware that this is an alpha version. So, was I using begin-conversation wrongly in the first place or is this a bug of some sort?
Cheers,
C.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050669#4050669
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050669
18Â years, 10Â months