[JBoss Seam] - Re: Beginning conversations in @Factory methods
by iradix
anonymous wrote : By "stateless", I don't really mean using a SLSB, I mean using only request-scoped state, and passing state as request parameters (like the blog example does).
I'll check out the blog example, but I'd imagine that does bypass the usage of a DataTable. Seems a shame since at first glance that was one of my favorite JSF features. Any thoughts on using PAGE scope and reattaching the selected object in a method anotated @DataModelSelection?
Also, I've used the @End(beforeRedirect=true) feature and it works great.... except that in the endConversation(boolean beforeRedirect) method of ConversationInterceptor, you have:
Manager.instance().endConversation(false)
rather than
Manager.instance().endConversation(beforeRedirect)
After the change it does exactly what I was looking for though so thanks again.
-Dave
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957795#3957795
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957795
19 years, 9 months
[JBossCache] - Problem using FileCacheLoader
by bruce_zhang
Hi,
I am setting up a prototype to evaluate our re-engineering project.
I need a cache system to hold the transaction data and I've choose JBoss Cache after browsing the website. So I am new to JBoss Cache and I meet a problem in setting up using the FileCacheLoader.
My intension is to first setup a simple Cache with file persist for fail over recovery. Everything seems working fine untill I set up a FileCacheLoder.
The problem is it becomes SO SLOW for putting entries after set up the FileCacheLoader. I have a testing program that simply write and read
some objects to the same cache node in a loop. Before I set up the FileCacheLoader, it take only about 1-2ms to read/write an object.
But after using the FileCacheLoader, it takes 100ms to write an entry in the beginning and the time keeps growing and finally reach about 1000ms per write. I know there must be some performance degrade after using cacheLoader but this kind of degrade seems not right . Can somebody take a look at my configuration file as following, Thanks a lot !
Besides, will a JDBCCacheLoader provide better performance ? It will be greatly appreciated if somebody can provide samples for that .
=========== jbosscache-config.xml ==========
|
| <server>
|
| <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar"/>
|
| <mbean code="org.jboss.cache.TreeCache" name="jboss.cache:service=TreeCache">
|
| <depends>jboss:service=Naming</depends>
| <depends>jboss:service=TransactionManager</depends>
|
| <attribute name="TransactionManagerLookupClass">org.jboss.cache.DummyTransactionManagerLookup</attribute>
|
| <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
|
| <attribute name="CacheMode">LOCAL</attribute>
|
| <attribute name="ClusterName">TreeCache-Cluster</attribute>
|
| <attribute name="ClusterConfig">
| <config>
| <!-- UDP: if you have a multihomed machine,
| set the bind_addr attribute to the appropriate NIC IP address
| -->
| <!-- UDP: On Windows machines, because of the media sense feature
| being broken with multicast (even after disabling media sense)
| set the loopback attribute to true
| -->
| <UDP mcast_addr="228.1.2.3" mcast_port="45566" ip_ttl="64" ip_mcast="true"
| mcast_send_buf_size="150000" mcast_recv_buf_size="80000" ucast_send_buf_size="150000"
| ucast_recv_buf_size="80000" loopback="false" />
| <PING timeout="2000" num_initial_members="3" up_thread="false" down_thread="false" />
| <MERGE2 min_interval="10000" max_interval="20000" />
| <FD shun="true" up_thread="true" down_thread="true" />
| <VERIFY_SUSPECT timeout="1500" up_thread="false" down_thread="false" />
| <pbcast.NAKACK gc_lag="50" max_xmit_size="8192" retransmit_timeout="600,1200,2400,4800" up_thread="false"
| down_thread="false" />
| <UNICAST timeout="600,1200,2400" window_size="100" min_threshold="10" down_thread="false" />
| <pbcast.STABLE desired_avg_gossip="20000" up_thread="false" down_thread="false" />
| <FRAG frag_size="8192" down_thread="false" up_thread="false" />
| <pbcast.GMS join_timeout="5000" join_retry_timeout="2000" shun="true" print_local_addr="true" />
| <pbcast.STATE_TRANSFER up_thread="false" down_thread="false" />
| </config>
| </attribute>
|
| <attribute name="SyncReplTimeout">10000</attribute>
|
| <attribute name="LockAcquisitionTimeout">15000</attribute>
|
| <attribute name="EvictionPolicyClass"></attribute>
|
| <attribute name="CacheLoaderConfiguration">
| <config>
| <passivation>false</passivation>
| <preload>/test</preload>
| <shared>false</shared>
|
| <cacheloader>
| <class>org.jboss.cache.loader.FileCacheLoader</class>
| <properties>
| location=/tmp/filetore
| </properties>
| <async>true</async>
|
| <fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| <purgeOnStartup>false</purgeOnStartup>
| </cacheloader>
|
| </config>
| </attribute>
|
| </mbean>
| </server>
===== Testing Program =====
|
| TreeCache cache = new TreeCache();
| PropertyConfigurator pc = new PropertyConfigurator();
| pc.configure(cache, "jbosscache-config.xml");
|
| cache.createService();
| cache.startService();
|
| cache.put("/test", key, obj );
|
| ....
[img][/img][img][/img]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957787#3957787
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957787
19 years, 9 months
[Installation, Configuration & Deployment] - Re: log4j email appender not working with jboss
by ALRubinger
Hiya. My application is packaged as a JAR which in turn contains EJB3 JARs and other library JARs. I'm Using JBoss 4.0.4-GA with the log4j.xml in ${JBOSS_HOME}/server/[instancename]/conf:
<?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
| <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"
| debug="true">
|
| <!-- ============================== -->
| <!-- Append messages to the console -->
| <!-- ============================== -->
|
| <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
| <!-- <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> -->
| <param name="Target" value="System.out" />
| <layout class="org.apache.log4j.PatternLayout">
| <!-- The default pattern: Date Priority [Category] Message\n -->
| <param name="ConversionPattern"
| value="%d{ABSOLUTE} %-5p [%c{1}] %m%n" />
| </layout>
| </appender>
|
| <!-- -->
| <!-- Declare the SMTPAppender -->
| <!-- -->
| <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
| <errorHandler
| class="org.jboss.logging.util.OnlyOnceErrorHandler" />
| <param name="Threshold" value="DEBUG" />
| <param name="SMTPHost" value="myhost" />
| <param name="To" value="mytoaddress" />
| <param name="From" value="myfromaddress" />
| <param name="BufferSize" value="40" />
| <param name="Subject" value="[SYSTEM ERROR] Application Error - ${jboss.server.name}" />
| <layout class="org.apache.log4j.HTMLLayout" />
| </appender>
|
| <!-- ====================== -->
| <!-- More Appender examples -->
| <!-- ====================== -->
|
| <!-- Buffer events and log them asynchronously -->
| <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
| <errorHandler
| class="org.jboss.logging.util.OnlyOnceErrorHandler" />
| <appender-ref ref="SMTP" />
| </appender>
|
| <!-- ======================= -->
| <!-- Setup the Root category -->
| <!-- ======================= -->
|
|
|
| <!-- ================ -->
| <!-- Limit categories -->
| <!-- ================ -->
|
| <!-- Increase MyPackage Logging Visibility -->
| <category name="com.mypackage">
| <priority value="ALL" />
| </category>
|
| <!-- Show SQL Logs for Hibernate Schema Export -->
| <category name="org.hibernate.tool.hbm2ddl.SchemaExport">
| <priority value="DEBUG" />
| </category>
|
| <root>
| <priority value="INFO" />
| <appender-ref ref="CONSOLE" />
| <appender-ref ref="ASYNC" />
| </root>
|
| </log4j:configuration>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957785#3957785
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957785
19 years, 9 months
[JBoss jBPM] - Re: JBPM_LOG: who performed the transition?
by michaelholtzman
I solved this by adding my own ProcessLog subclass:
| package com.olf.bpm.identity;
|
| import org.jbpm.logging.log.*;
|
| public class IdentityLog extends CompositeLog {
|
| private static final long serialVersionUID = 1L;
|
| protected String actorId = null;
|
| public IdentityLog() {
| }
|
| public IdentityLog(String invoker) {
| this.actorId = invoker;
| }
|
| public String getActorId() {
| return actorId;
| }
|
| public String toString() {
| return "invoker["+ actorId +"]";
| }
| }
|
And the corresponding hibernate config file:
| <?xml version="1.0"?>
|
| <!DOCTYPE hibernate-mapping PUBLIC
| "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
| "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
|
| <hibernate-mapping default-access="field">
|
| <subclass name="com.olf.bpm.identity.IdentityLog"
| extends="org.jbpm.logging.log.ProcessLog"
| discriminator-value="9">
|
| <property name="actorId"
| column="TASKACTORID_"/>
|
| </subclass>
|
| </hibernate-mapping>
|
Then, before initiating any BPM action, I call:
| idLog = new IdentityLog(invoker);
| token.startCompositeLog(idLog);
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3957784#3957784
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3957784
19 years, 9 months