[JBoss Seam] - Re: Parameter passing for page action
by milli
"christian.bauer(a)jboss.com" wrote : <f:param name="category" value="#{home.category}" />
|
| ?! What is that supposed to do? It renders the toString() method of the Category class as a URL parameter. Seriously, you need to read up on conversations.
|
Sorry that I didn't make it clear. I changed category to a string variable(in the latest one) just to see if it would get passed. Basically I'm passing a category name(string) as a parameter to categoryAction(categoryAction.action) to see if it would available in category.xhtml if categoryAction is in EVENT scope. When the action method(categoryAction.action) is called, the member variables "category" is set to "Testing Event Scope"(thru' @RequestParametr) and Id is set to 1.
But when the page category.xhtml is loaded they are not available.
I am looking in to conversations as well. But EVENT scope meets my requirements if it works the way it is supposed to work.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045950#4045950
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045950
19 years, 1 month
[JBoss jBPM] - process design
by sergey.rybets
Guys sorry for distrub.
I've got a question - for example I have activity in process that should iterate via several clients (stored in DB) and send for each e-mail simultaneously (in one activity but for each notification should be created a task in process).
Does smth like for (Client client : clientCollection) {client.notifyViaEmail(); }
can be implemented somehow in process definitions? I can't hardcode the number of clients in process because that enough large number and need to execute this activity to create one task for each client (emailng just an example - but it shoul be executed on cluster system, and each task will be executed on cluster node).
Thanks a lot for help.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045948#4045948
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045948
19 years, 1 month
[JBossCache] - ModificationEntry memory leak when aspectized object used in
by tfila
Hello,
I believe that there is a memory leak in the PojoCache (JBossCache-1.4.1.SP3) when storing aspectized objects in a collection in the cache. ModifcationEntry objects are added to the PojoCache undoListLocal_ ThreadLocal object, but are never removed after a successful commit to the cache and contain references to the objects being placed in the cache. The undoListLocal_ list continues to grow while the same thread is used to make modifications to the cache.
Below is a unit test which shows this behavior.
| package org.jboss.cache.aop.collection;
|
| import java.io.Serializable;
| import junit.framework.Test;
| import junit.framework.TestCase;
| import junit.framework.TestSuite;
| import org.apache.commons.logging.Log;
| import org.apache.commons.logging.LogFactory;
| import org.jboss.cache.aop.PojoCache;
| import org.jboss.cache.PropertyConfigurator;
|
| import java.util.*;
|
| import javax.transaction.TransactionManager;
| import javax.transaction.Transaction;
|
|
| class MyReplicatedClass
| {
| String key = null;
| int value;
|
| public MyReplicatedClass( String key, int value )
| {
| this.key = key;
| this.value = value;
| }
| }
|
| class MySerializableReplicatedClass implements Serializable
| {
| private static final long serialVersionUID = 6049469200632947143L;
|
| String key = null;
| int value;
|
| public MySerializableReplicatedClass( String key, int value )
| {
| this.key = key;
| this.value = value;
| }
| }
|
| public class ReplicatedAsyncCollectionTest extends TestCase
| {
| Log log=LogFactory.getLog(ReplicatedAsyncCollectionTest.class);
| PojoCache cache1;
| PojoCache cache2;
|
| public ReplicatedAsyncCollectionTest(String name)
| {
| super(name);
| }
|
| protected void setUp() throws Exception
| {
| super.setUp();
| log.info("setUp() ....");
| cache1 = createAsyncCache("CacheGroup");
| cache2 = createAsyncCache("CacheGroup");
| }
|
| protected void tearDown() throws Exception
| {
| super.tearDown();
| cache1.remove("/");
| cache1.stop();
| cache2.stop();
| }
|
| private PojoCache createAsyncCache(String name) throws Exception {
| PojoCache tree=new PojoCache();
| PropertyConfigurator config=new PropertyConfigurator();
| config.configure(tree, "META-INF/replAsync-service.xml");
|
| tree.setClusterName(name);
| tree.createService();
| tree.startService();
| return tree;
| }
|
| public void testPojoMapModList() throws Exception
| {
| Map myMap = new HashMap();
| cache1.putObject( "/myTest", myMap );
| myMap = (HashMap)cache1.getObject("/myTest");
| TransactionManager mgr = cache1.getTransactionManager();
| for ( int i = 0; i < 10; i++ )
| {
| mgr.begin();
|
| MySerializableReplicatedClass mrc = new MySerializableReplicatedClass(Integer.valueOf(i).toString(), i );
| myMap.put(mrc.key, mrc);
|
| mgr.commit();
| }
|
| log.info( "cache1 modification list size = "
| + (cache1.getModList() == null ? 0 : cache1.getModList().size()) );
|
| assertEquals(cache1.getModList().size(), 0 );
| }
|
| public void testPojoAopMapModList() throws Exception
| {
| Map myMap = new HashMap();
| cache1.putObject( "/myTest", myMap );
| myMap = (HashMap)cache1.getObject("/myTest");
| TransactionManager mgr = cache1.getTransactionManager();
| for ( int i = 0; i < 10; i++ )
| {
| mgr.begin();
|
| MyReplicatedClass mrc = new MyReplicatedClass(Integer.valueOf(i).toString(), i );
|
| myMap.put(mrc.key, mrc);
|
| mgr.commit();
|
| }
| // Possible work around to manually clear the undo list
| // cache1.getModList().clear();
| log.info( "cache1 modification list size = "
| + (cache1.getModList() == null ? 0 : cache1.getModList().size()) );
|
| assertEquals(cache1.getModList().size(), 0 );
| }
|
|
| public static Test suite() throws Exception
| {
| return new TestSuite(ReplicatedAsyncCollectionTest.class);
| }
|
| public static void main(String[] args) throws Exception
| {
| junit.textui.TestRunner.run(suite());
| }
|
| }
|
|
The corresponding jboss-aop.xml is
| <?xml version="1.0" encoding="UTF-8"?>
|
| <aop>
|
| <prepare expr="field(* org.jboss.cache.aop.collection.MyReplicatedClass->*)" />
|
| </aop>
|
The META-INF/replAsync-service.xml that comes with the JBossCache tests can be used.
The unit test contains two tests: the first (testPojoMapModList) adds Serializable objects to the collection in the PojoCache; and the other (testPojoAopMapModList) adds AOP'd objects to the collection. In the first test after adding Serializable objects to the collection, the undoListLocal_ object is clean. In the second test after adding the AOP'd objects to the collection, the undoListLocal_ still contains all ModificationEntry objects from the transactions used to update the collection. This behavior is also seen is earlier versions of the PojoCache.
The ModificationEntry (PojoCache.undoListLocal_) list can be retrieved from the PojoCache through the getModList() method for the executing thread. Is it safe to clear this list manually after the transaction has been completed? If so this would be a usable solution for this version. The other solution is to use non-AOP'd (i.e. Serializable objects) in the collection, though that is not optimal.
Any thoughts or other work around would be appreciated.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045946#4045946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045946
19 years, 1 month
[JBoss Seam] - Re: seam cannot reference EJB, why?
by hsiung
Hi Titou
thanks for your enhancement. I love Seam but for me too it is a show stopper if it does not support the REMOTE feature (which includes the ability to deploy Seam components on different J2EE modules).
However I have some hope. Christian Bauer from the Seam team told me that the REMOTE feature will be out there in about 2-3 months.
On the other hand, JBSEAM-1269 "Support for remotely deployed EJBs" in JIRA has not been assigned yet. Gavin?..
I'm wondering if some of you (Seam programers) find the REMOTE feature as important as we do.
As you mentioned, Titou, the current Seam implementation goes against the J2EE modules architecture. But it goes also against the current use in the enterprise. In many company I've seen, the EJB containers are highly secured because it runs critical data and algorithms. The Web containers provide a public view for internet users and are placed in the DMZ. A firewall separate the Web and the EJB containers. In other companies there are many EJB containers placed on different machines with different life cycles and owned by different departments and placed on different locations. From the 25 projects in 10 companies I worked for, in Telco, Banks and Insurances, 80% use remote EJBs.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045945#4045945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045945
19 years, 1 month
[JBoss Seam] - Breadcrumbs
by gzoller
Hello,
I'm having some difficulty w/breadcrumbs. I copied from the issues example and from the documentation.
My pages.xml file looks like this:
| <!DOCTYPE pages PUBLIC
| "-//JBoss/Seam Pages Configuration DTD 1.2//EN"
| "http://jboss.com/products/seam/pages-1.2.dtd">
|
| <pages>
| <page view-id="/home.xhtml">Home</page>
| <page view-id="/Timezones.xhtml">World Time</page>
| <page view-id="/Foo.xhtml">FooBar</page>
| </pages>
|
In my nav area (where I want the breadcrumbs) I have code that looks like this:
| <form>
| <t:dataList value="#{conversationStack}" var="entry">
| <h:outputText value=" | "/>
| <t:commandLink value="#{entry.description}" action="#{entry.select}"/>
| </t:dataList>
| </form>
|
(Tomahawk is installed and working fine for my application.)
If I nav to path "Home | World Time | FooBar" I should see breadcrumbs accordingly. Instead on FooBar page my breadcrumbs link shows only "World Time" (but not Home and no FooBar). The value of the "World Time" link is FooBar (current page), which is wrong--should be the world time page.
Any ideas what I might be doing wrong?
Thanks,
Greg
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045941#4045941
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045941
19 years, 1 month