[JBoss Seam] - Re: Seam-Managed Persistence Context
by pete.muir@jboss.org
"rjstanford" wrote : Would I be better off simply storing the ID in session scope and doing a factory every time? That seems a little intensive, but at the same time I don't want to have to create an action for every page just to create a persistence context to merge() the currentUser object to.
This would be my approach, but it depends on how often you need the currentUser object - bear in mind that the object is probably in the Hibernate 2nd level cache anyway. It will also play nice with all your other objects in this scenario. Otherwise you can create a SESSION scoped SMPC (just set the scope in components.xml) - but it will be a different SMPC from your normal one, so you'll get exceptions if you try to manage the wrong object in the wrong PC.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080979#4080979
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080979
18 years, 7 months
[JBoss jBPM] - Transitions not being followed correctly
by jbaxter
I am following the tutorial in "Business Process Management with JBoss jBPM", using jbpm-jpdl-3.2.1 rather than the version which the book is based on (jbpm-jpdl-3.2.GA).
To make the demo code (which is downloadable from packpub.com) work i had to modify the supplied SQL which gets put into the hypersonicDB. This was simply:
update jbpm_id_membership set GROUP_ = 'user' where GROUP_ = 'participant';
The trouble i am getting is that the token does not move to the correct node when selecting the 'yes' or 'no' transition on the 'All contracts agreed?' tasknode. The taskform displayed has the following code:
| <jbpm:datacell>
| <f:facet name="header">
| <h:outputText value="Actions"/>
| </f:facet>
| <!-- TASKFORM BUTTONS -->
| <tf:saveButton value="Save"/>
| <tf:cancelButton value="Cancel"/>
| <tf:transitionButton transition="No" value="No"/>
| <tf:transitionButton transition="Yes" value="Yes"/>
|
| </jbpm:datacell>
|
However, whatever i do, the token always moves along the 'no' transition and i end up in an infinate loop! Any suggestions?!
On a sidenote, there is also a bug in jbpm-jpdl-3.2.1 which produces a warning about the lack of a security-role for 'user'. This can be fixed by adding the following to the web.xml of the jbpm-console webapp:
| <security-role>
| <role-name>user</role-name>
| </security-role>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080978#4080978
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080978
18 years, 7 months
[Clustering/JBoss] - How to configure JGroups for specific NIC address?
by mkrzemien
We use hosts with multiple NICs. One specific NIC in each host is intended for JBossCache/JGroups communication. Does anyone know how to configure JGroups for such environment. Specifically I don't know how to configure GMS to use a specified NIC. (I am not sure if the GMS it the only thing that makes the problem). The only place I know that allows specifying addresses in configuration is the UDP part.
I made some prototyping - details below.
Thank you in advance
kind regards
Mariusz
Version: JBossCache 1.4.1 SP3, JGroups 2.4.1
Environment: a LAN consisting of two hosts (), each host with two NICs (eth0, eth1), the hosts connected directly (possible connections: eth0-to-eth0, eth1-to-eth1), only one link working (either eth-0-to-eth0 or eth1-to-eth1). JGroups was intended to communicate on the working interfaces and to use multicast (see Configuration below)
Test description:
- link eth0-to-eth0 working, link eth1-to-eth1 broken. JGroups configured for working interfaces
on each node started one instance of JBossCache
replication working correctly
repeat test for link eth1-to-eth1 working, link eth0-to-eth0 broken
For both test executions GMS reported using eth0. For the first execution replication worked fine. For second execution there was no replication until I repaired eth0-to-eth0 link.
Configuration details:
<UDP mcast_addr="228.8.8.8" 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"
<!-- receive_interfaces="eth1"
send_interfaces="eth1"/>-->
receive_interfaces="eth0"
send_interfaces="eth0"/>
<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" />-->
<FD_SOCK/>
<VERIFY_SUSPECT timeout="1500"
up_thread="false" down_thread="false"/>
<pbcast.NAKACK gc_lag="50" retransmit_timeout="600,1200,2400,4800"
max_xmit_size="8192" 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"/>
<pbcast.GMS join_timeout="5000" join_retry_timeout="2000"
shun="true" print_local_addr="true"/>
<FC max_credits="2000000" down_thread="false" up_thread="false"
min_threshold="0.20"/>
<FRAG frag_size="8192" down_thread="false" up_thread="true"/>
<pbcast.STATE_TRANSFER up_thread="true" down_thread="true"/>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080965#4080965
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080965
18 years, 7 months
[JBoss Seam] - Re: Seam-Managed Persistence Context
by rjstanford
Sorry to resurrect a dead thread, but it seems pretty relevant.
Is there a way to correctly use SMPCs to have a truly extended context for use with, say, a Session scope entity bean? I have a "currentUser" bean that's in session scope, and it has references to various other components - I'm looking for a way to be able to reference these in pages whether or not they've previously been loaded. However, everything seems to be aimed at mid-life conversation scoped objects.
Would I be better off simply storing the ID in session scope and doing a factory every time? That seems a little intensive, but at the same time I don't want to have to create an action for every page just to create a persistence context to merge() the currentUser object to.
What's the correct thing to do here?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080963#4080963
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080963
18 years, 7 months
[JBoss Seam] - f:converter and maxdigits
by nemya
Hi,
I have an inputtext for a float value. I added the converter to have this:
<h:inputText value="#{MyBean.MyValue}">
| <f:converter converterId="javax.faces.Float" />
| </h:inputText>
This works fine but I'd like this float value to be displayed with 2 fraction digits. I know that the <f:convertNumber> with the maxFractionDigits and minFractionDigits does this but when I use it like this :
<h:inputText value="#{MyBean.MyValue}">
| <f:converter converterId="javax.faces.Float" />
| <f:convertNumber minFractionDigits="2" maxFractionDigits="2"/>
| </h:inputText>
I have a cast exception
java.lang.ClassCastException: java.lang.Double
And when I use it like this:
<h:inputText value="#{MyBean.MyValue}">
| <f:convertNumber minFractionDigits="2" maxFractionDigits="2"/>
| <f:converter converterId="javax.faces.Float" />
| </h:inputText>
I have no problem but I don't have 2 fraction digits.
Some help please! (using Jboss Seam 1.2.1.GA + Jboss AS 4.0.5.GA)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4080962#4080962
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4080962
18 years, 7 months