[jBPM Development] - why jbpm5.3 usertask support only one incoming connection?
by gao haijun
gao haijun [https://community.jboss.org/people/vavi] created the discussion
"why jbpm5.3 usertask support only one incoming connection?"
To view the discussion, visit: https://community.jboss.org/message/741623#741623
--------------------------------------------------------------
I have a process, contains approve and reject. if reject,the process should return to usertask1.
if I write the process definition file using hand(without the eclipse plugin),it will throw a exception:
*ProcessLoadError: unable to parse xml : Exception class java.lang.IllegalArgumentException : This type of node cannot have more than one incoming connection!*
imo, what I said should be a *common request/case*.
so why jbpm5.3 usertask support only one incoming connection?
Hope someone can answer my question,thx a lot.
PS:the process difinition details:
<itemDefinition id="_conditionWhoItem" structureRef="Object" />
<itemDefinition id="_2-conditionWhoItem" structureRef="Object" />
<itemDefinition id="_4-conditionWhoItem" structureRef="Object" />
<itemDefinition id="_5-conditionWhoItem" structureRef="Object" />
<process processType="Private" isExecutable="true" id="com.sample.bpmn" name="Sample Process" tns:packageName="defaultPackage" >
<!-- process variables -->
<property id="conditionWho" itemSubjectRef="_conditionWhoItem"/>
<!-- nodes -->
<startEvent id="_1" name="StartProcess" />
<userTask id="_2" name="1" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>FME</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<exclusiveGateway id="_3" name="Gateway" gatewayDirection="Diverging" />
<userTask id="_4" name="3" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>SLE2</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<userTask id="_5" name="2" >
<ioSpecification>
<inputSet>
</inputSet>
<outputSet>
</outputSet>
</ioSpecification>
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>SLE1</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<endEvent id="_6" name="End" >
<terminateEventDefinition/>
</endEvent>
<!-- connections -->
<sequenceFlow id="_5-_2" sourceRef="_5" targetRef="_2" />
<sequenceFlow id="_1-_2" sourceRef="_1" targetRef="_2" />
<sequenceFlow id="_2-_3" sourceRef="_2" targetRef="_3" />
<sequenceFlow id="_3-_4" sourceRef="_3" targetRef="_4" name="SLE2" >
<conditionExpression xsi:type="tFormalExpression" >return conditionWho == "SLE2";</conditionExpression>
</sequenceFlow>
<sequenceFlow id="_3-_5" sourceRef="_3" targetRef="_5" name="SLE1" >
<conditionExpression xsi:type="tFormalExpression" >return conditionWho == "SLE1";</conditionExpression>
</sequenceFlow>
<sequenceFlow id="_4-_6" sourceRef="_4" targetRef="_6" />
</process>
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/741623#741623]
Start a new discussion in jBPM Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[JBoss AS 7 Development] - Management of HornetQ core queues
by Jeff Mesnil
Jeff Mesnil [https://community.jboss.org/people/jmesnil] created the discussion
"Management of HornetQ core queues"
To view the discussion, visit: https://community.jboss.org/message/773191#773191
--------------------------------------------------------------
While working on AS7-1960[1] Kabir noticed that HornetQ core queues created with the HornetQ API (eg ClientSession.createQueue) were not exposed correctly as AS7 resources. The resource does not exist (:read-resource & :write-attribute fails) but it is still possible to interact with it (eg invoke :read-attribute or other queue-specific operations such as :pause or :resume)[2].
The problem is more general for HornetQ. When HornetQ creates JMS resources, it also creates underlying core queues for them (1 core queue per JMS queue and 1 + n core queues for 1 JMS topic with n subscribers).
These core queues are not exposed by AS7 either[3].
My first idea was to materialize these resources correctly but this brings more problems. Their resource definitions flagged them as stored in the configuration. I don't think that queues created outside of the AS7 management API should be stored in its configuration.
At the same time, for backwards compatibility, we must continue to support the management operations on these core queues at their current addresses (/subsystem=messaging/hornetq-server=XXX/queue=YYY)
After talking to Kabir on IRC, the idea would be to:
* expose all HornetQ core queues as runtime read-only resources in a separate address (eg /subsystem=messaging/hornetq-server=XXX/runtime-queue=YYY). These resources would be handled dynamically based on HornetQServer management service (like it's done for core-address resources)
* for backwards compatibility, forward the "read-only" and runtime management operations (read-attribute, queue-specific operations) from /subsystem=messaging/hornetq-server=XXX/queue=YYY to /subsystem=messaging/hornetq-server=XXX/runtime-queue=YYY
* Queues created by AS7 management API will remain at their current address and support read/write attributes and be persisted in AS7 configuration
[1] https://issues.jboss.org/browse/AS7-1960 https://issues.jboss.org/browse/AS7-1960
[2] https://issues.jboss.org/browse/AS7-5850 https://issues.jboss.org/browse/AS7-5850
[3] https://issues.jboss.org/browse/AS7-4960 https://issues.jboss.org/browse/AS7-4960
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/773191#773191]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[JBoss AS 7 Development] - Stateful Session Bean memory leak in AS 7.1.1 (win 7, redhat linux)
by Hans-Dieter Mader
Hans-Dieter Mader [https://community.jboss.org/people/maderhan] created the discussion
"Stateful Session Bean memory leak in AS 7.1.1 (win 7, redhat linux)"
To view the discussion, visit: https://community.jboss.org/message/773137#773137
--------------------------------------------------------------
Hi,
I have got a SFSB running on 7.1.1 standalone.
The SFSB has been migrated from ejb2 to ejb3.1 (Home, Remote, Bean impl., ejb-jar.xml).
Passivation on server is NoPassivate (simple).
The client calls come from a tomcat 7.
*After running a time with a number of remote calls, the AS 7 vm is out of memory.*
*Force GC does not free the jvm memory pool "tenured gen" on windows or "ps old gen" on linux!*
*Only when I disable the Bean, the memory is freed.*
Client:
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put("jboss.naming.client.ejb.context", true);
jndiProps.put(Context.PROVIDER_URL,"remote://myserver:4447");
jndiProps.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
jndiProps.put(Context.SECURITY_PRINCIPAL, "username");
jndiProps.put(Context.SECURITY_CREDENTIALS, "password");
InitialContext context=new InitialContext( jndiProps );
PortalHome pHome = (PortalHome)c.lookup("ejb:/PortalBean/PortalBean!uiportal.ejb.session.PortalHome?stateful");
Portal pRemote = pHome.create();
pRemote.doSomeStuff();
pRemote.ejbRemove(); // Bean Method annotaded with @Remove, also in Remote Interface -> the @PreDestroy method will be called by the server!!!!
context.close();
Any idea is highliy appreciated!!!!
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/773137#773137]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[EJB3 Development] - Suspend MDB message processing until @StartupBean has finished initialization
by skowski
skowski [https://community.jboss.org/people/skowski] created the discussion
"Suspend MDB message processing until @StartupBean has finished initialization"
To view the discussion, visit: https://community.jboss.org/message/772984#772984
--------------------------------------------------------------
Hi :-)
While migrating a JBoss 5 application to JBoss AS 7 (7.1.1.FINAL) I have a problem with a new JMS message driven EJB. Within message processing, some master data fields have to be checked. To enhance performance, this master data shall be preloaded into a cache structure using a @Singleton @Startup EJB, which needs about 30 seconds to load the data.
My problem is that the queue message processing starts even if the cache has not been fully initialized, causing message validation errors.
I tried to define a dependency between the MDB and the startup EJB, but as far as I understood the @DependsOn annotation works only with @Singleton EJBs. So it's clear that my solution does not work ;-)
Startup bean code:
{code}
@Singleton
@Startup
public class StartupBean {
@PostConstruct
void atStartup() {
// TODO load master data cache (takes about 30 seconds)
}
@PreDestroy()
void atShutdown() {
// TODO free master data cache
}
}
{code}
Note: I stripped the real code from the example to make it easier to read :-)
Message driven bean code:
{code}
@MessageDriven(name="SampleMessagingBean", activationConfig = {
@ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination", propertyValue="jms/SampleQueue"),
@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
})
@DependsOn("StartupBean")
public class SampleMessagingBean implements MessageListener {
public void onMessage(Message message) {
// TODO validate message using master data cache
}
}
{code}
Question: How can I suspend message processing until the startup bean has finished loading the cache?
Any suggestions greatly appreciated :-)!
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/772984#772984]
Start a new discussion in EJB3 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[JBoss AS 7 Development] - Login module and session issues
by Vladimir Kishlaly
Vladimir Kishlaly [https://community.jboss.org/people/mkind] created the discussion
"Login module and session issues"
To view the discussion, visit: https://community.jboss.org/message/772973#772973
--------------------------------------------------------------
Hi!
I've created a simple login module based on org.jboss.security.auth.spi.UsernamePasswordLoginModule.
Also, created a new security domain:
[code]
<security-domain name="mydomain" cache-type="default">
<authentication>
<login-module code="com.test.MylLoginModule" flag="required"></login-module>
</authentication>
</security-domain>
[/code]
jboss-web.xml:
[code]
<jboss-web>
<context-root>myapp</context-root>
<security-domain>mydomain</security-domain>
<disable-audit>true</disable-audit>
</jboss-web>
[/code]
Authentication configuration in web.xml:
[code]
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginerror.jsp</form-error-page>
</form-login-config>
</login-config>
[/code]
All works fine, but if to login from several different places (computers), session sometimes seems "shared": login/logout in app running in one machine causes login/logout for the application running on another. In other words, two users trying to login using the same credentials, but from different places.
I was sure such authentication mechanizm works with browser session, isn't it?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/772973#772973]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months
[JBoss AS 7 Development] - Privileged attribute not supported on JBossweb
by Boubaker Khanfir
Boubaker Khanfir [https://community.jboss.org/people/boubaker] created the discussion
"Privileged attribute not supported on JBossweb"
To view the discussion, visit: https://community.jboss.org/message/772952#772952
--------------------------------------------------------------
While attempting to install a software on Jboss EAP 6, I encoutered some problems related to the fact that "context.xml" isn't supported.
I wanted to use the attribute "privileged" in "context.xml" to get the ServletWrapper in my ContainerServlet. But it didn't work.
Why?
*Explanation:*
After reading the method "loadServlet" of the class "org.apache.catalina.core.StandardWrapper", I found this block:
// Special handling for ContainerServlet instances
if ((servlet instanceof ContainerServlet) &&
(isContainerProvidedServlet(actualClass) ||
*((Context)getParent()).getPrivileged()* )) {
((ContainerServlet) servlet).setWrapper(this);
}
IMHO, that's a bug, because the new fork of JBoss AS7 from TC7 don't allow to change the "privileged" attribute context (by configuration or any other way), so it's always false, that's why we can't get this work as for TC7 and not in Jboss AS7 (EAP6).
*Solution:*
One of those solution can be made:
1. An alternative to set "privileged" via configuration (Init param or other).
2. Remove the block "*((Context)getParent()).getPrivileged()*" from the above test statement.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/772952#772952]
Start a new discussion in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 4 months