[JBoss Seam] - setting a DataModel to null from another session bean
by surajmundada@yahoo.com
Hi,
I am using Seam 1.0.0 GA.
I am facing a situation where I want to set DataModel to null from the bean in which it is not defined.
I have defined a DataModel in session bean 1 and populating it in a Factory method.
On some event in my application, the page is getting rendered which uses this DataModel to display the list.
When this event happens, control goes to some other session bean 2 and after that page gets rendered. But because value of DataModel in session bean 1 is not null, it is not repopulated.
I want to make it null from session bean 2. How can I do it?
I have tried some workaround. I tried raising an event from session bean 2 to call the factory method in session bean 1. But some variables which are injected in session bean 1 are supposed to be outjected from session bean 2. So these variables give "In attribute requires value" error if I raise an event.
Other workaround which I tried is: I added the page view id and the factory method name in pages.xml and converted the factory method into a non-factory method. Now method gets called and DataModel gets populated when the page is rendered. This creates another problem where my method gets called on any click of button or link on that page.
How can I solve this problem?
Waiting for a early reply,
Suraj
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049368#4049368
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049368
18 years, 10 months
[JBoss Messaging] - Listing JMS Messages using JMX doesn't give full message
by mskonda
I have developed set of tools to "browse" messages on destinations for Kabutar. The approach I've taken is to use JBoss JMS MBeans rather than clumsy JMS QueueBrowser.
I am able to create/fetch the MBean responsible for the destination of my interest, however, when I try to have a peek at the message content, I don't get anything except printing:
JBossMessage[0]:NON-PERSISTENT
JBossMessage[0]:NON-PERSISTENT
etc..
I get null when I tried getting the text (after convesion to TextMessage) from the message.
here's my test code:
| public void testQueueInfo() throws Exception
| {
| String name = "testSecuredQueue";
| logger.info("Deploying the queue - " + name);
| MBeanServerConnection mBeanServer = lookupMBeanServerProxy(new InitialContext());
| ObjectName serverObjectName = new ObjectName(
| "jboss.messaging.destination:service=Queue,name=" + name);
| ArrayList o = (ArrayList) mBeanServer.invoke(serverObjectName,
| "listAllMessages", new Object[0], new String[0]);
| for (Iterator i = o.iterator(); i.hasNext();)
| {
| Message msg = (Message)i.next();
| logger.info("Message: " + msg);
| TextMessage txtMsg = (TextMessage)msg;
| logger.info("TxtMessage: " + txtMsg.getText());
| }
| }
|
The same happens when you access litAllMessages method via JMX Browser
Any pointers?
Thanks
Madhu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4049358#4049358
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4049358
18 years, 10 months