[Design of JBoss jBPM] - Re: task component interface comments
by alex.guizar@jboss.com
Beyond the usual conventions, there are two things I dislike about returning Task from the setters:
1. the "set" prefix prevents a true "fluent" method chain. Compare the method chains with and without the TaskBuilder.
2. what if I want to add comments, subtasks, etc? the task interface does not have methods for that, you have to go back to the task service. The task builder can "remember" the task service that created it and invoke it internally.
task = taskService.buildTask()
| .name("report expenses")
| .due(today)
| .subTask()
| .name("gather receipts")
| .due(beforeLunch)
| .subTask()
| .name("capture amounts")
| .due(beforeLeaving)
| .done();
anonymous wrote : TaskBuilder is definitely not good. Task with setter is the way to go.
I got the TaskBuilder idea from the ProcessFactory that is already in the PVM module. How are they different?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196329#4196329
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196329
17 years, 1 month
[Design of EJB 3.0] - Re: Normal SFSB Business Methods named
by ALRubinger
OK, I can't fix this in AOP, even by extracting and overriding the hashing scheme.
ClassAdvisor registers methods by the bean impl class:
Putting advised method: -956421528 / public int org.jboss.ejb3.core.test.stateful.StatefulBean.getNextCounter()
While we determine invoked method by interface:
Method called: org.jboss.ejb3.core.test.stateful.StatefulLocalBusiness: org.jboss.ejb3.core.test.stateful.StatefulCommonBusiness.getNextCounter()
| 16:19:59,161 WARN [SessionSpecContainer] Method Hash used: 1793199750
When I throw in a hashing function that takes declaring class into account, then this will not be equal. No method will match.
And without the declaring class into consideration, methods named similarly from different interfaces will collide.
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196326#4196326
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196326
17 years, 1 month
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: infinite loop when connecting to a stopped acceptor
by jmesnil
I've isolated the problem: when there is no server to connect to, we have the infinite loop:
| public void testStartStop3() throws Exception
| {
| /***********************************/
| /* No JBM Server have been started */
| /***********************************/
|
| JBossConnectionFactory cf = new JBossConnectionFactory(new TransportConfiguration(NettyConnectorFactory.class.getName()),
| null,
| DEFAULT_CONNECTION_LOAD_BALANCING_POLICY_CLASS_NAME,
| DEFAULT_PING_PERIOD,
| DEFAULT_CONNECTION_TTL,
| DEFAULT_CALL_TIMEOUT,
| null,
| DEFAULT_ACK_BATCH_SIZE,
| DEFAULT_ACK_BATCH_SIZE,
| DEFAULT_CONSUMER_WINDOW_SIZE,
| DEFAULT_CONSUMER_MAX_RATE,
| DEFAULT_SEND_WINDOW_SIZE,
| DEFAULT_PRODUCER_MAX_RATE,
| DEFAULT_MIN_LARGE_MESSAGE_SIZE,
| DEFAULT_BLOCK_ON_ACKNOWLEDGE,
| DEFAULT_BLOCK_ON_NON_PERSISTENT_SEND,
| true,
| DEFAULT_AUTO_GROUP,
| DEFAULT_MAX_CONNECTIONS,
| DEFAULT_PRE_ACKNOWLEDGE,
| DEFAULT_RETRY_INTERVAL,
| DEFAULT_RETRY_INTERVAL_MULTIPLIER,
| DEFAULT_MAX_RETRIES_BEFORE_FAILOVER,
| DEFAULT_MAX_RETRIES_AFTER_FAILOVER);
| Connection connection = cf.createConnection();
| assertNotNull(connection);
|
| try
| {
| connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
| fail("acceptor must not accept connections when stopped");
| }
| catch (Exception e)
| {
| }
| }
|
The code runs in an infinite loop in ConnectionManagerImpl.getConnectionForCreateSession: the failover() method returns true while there has been no failover.
I'm continuing the investigation
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4196253#4196253
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4196253
17 years, 1 month