[JBoss Microcontainer Development] New message: "Re: DependencyInfo remove items"
by Kabir Khan
JBoss development,
A new message was posted in the thread "DependencyInfo remove items":
http://community.jboss.org/message/522866#522866
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
All tests pass with the below change which I have committed against https://jira.jboss.org/jira/browse/JBKERNEL-84. However, I do see a few warnings like this when running KernelAllTestSuite due to DemandDependencyItem not having its iDependOn set. Any ideas on making this more flexible? I kind of wish DependencyItem would record its dependencies somehow...
29221 WARN [AbstractKernelController] Problem finding dependency for AbstractDemandMetaData$DemandDependencyItem@4946101f{name=bean depends
On=null whenRequired=Instantiated resolved=false demand=foobar}
java.lang.IllegalArgumentException: Null name
at org.jboss.dependency.plugins.AbstractController.getContext(AbstractController.java:520)
at org.jboss.kernel.plugins.dependency.AbstractKernelController.getContext(AbstractKernelController.java:150)
at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1477)
at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1391)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:704)
at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:617)
at org.jboss.test.kernel.lazy.test.LazyInstantiationTest.testLazy(LazyInstantiationTest.java:109)
Index: dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java
===================================================================
--- dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java (revision 100075)
+++ dependency/src/main/java/org/jboss/dependency/plugins/AbstractController.java (working copy)
@@ -1459,7 +1459,40 @@
}
}
}
-
+
+ Set<DependencyItem> iDependOn = dependencies.getIDependOn(null);
+ if (iDependOn.isEmpty() == false)
+ {
+ for (DependencyItem item : iDependOn)
+ {
+ if (item.isResolved())
+ {
+ ControllerState whenRequired = item.getWhenRequired();
+ if (whenRequired == null || whenRequired.equals(fromState))
+ {
+ if (item.unresolved(this))
+ {
+ try
+ {
+ ControllerContext dependency = getContext(item.getIDependOn(), item.getDependentState());
+ if (dependency != null)
+ {
+ DependencyInfo info = dependency.getDependencyInfo();
+ if (info != null)
+ {
+ info.removeDependsOnMe(item);
+ }
+ }
+ }
+ catch(RuntimeException e)
+ {
+ log.warn("Problem finding dependency for " + item, e);
+ }
+ }
+ }
+ }
+ }
+ }
}
catch (Throwable error)
{
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522866#522866
14 years, 11 months
[jBPM Development] New message: "How to submit modifications to jBPM BPEL source code?"
by Carlos Oliveira
JBoss development,
A new message was posted in the thread "How to submit modifications to jBPM BPEL source code?":
http://community.jboss.org/message/522828#522828
Author : Carlos Oliveira
Profile : http://community.jboss.org/people/karluqs
Message:
--------------------------------------------------------------
Hi,
I'm from Brazil, and I work for CPqD, an enterprise who provides software solutions and consultancy for the telecom and energy market.
About one year ago we choose to install and use jBPM BPEL (RiftSaw was not available by that time) to integrate some systems in the production environment of one of our customers, but a lot of changes were demanded to attend the high volume of processes and the performance requirements that the production environment demands. Every day thousands of processes are created and stay in execution for some days util they are finally finished, so performance, hardware resources consumption and reliability were our main concerns.
To provide that, I have made a huge modification in the jBPM BPEL 1.1.1 source code, fixing bugs and doing a lot of otimizations and performance improvements. The modifications were tested by our team, and the result is running at the production environment today, so the modification were very successful.
Now we want to send the modified code to the jBPM BPEL project. I noticed that jBPM BPEL is not actively anymore. Is the source code still helpfull to you? How can I do that ? What is the procedure to be followed?
Thanks,
Carlos
Here the list of modifications:
- The architecture based on JMS didn't support thousands of process instances in receive state (tested with 50000 process), itcaused high memory consumption (25GB) and several minutes waiting jboss to start to load all jms receivers (about 20 minutes on a server with 12 cores and Oracle 10g). We removed JMS parts and altered to query the database when receiving a message to continue a process . This caused the loss of asynchronous messages which are not necessary for us. Another solution will be required if someone needs to use of asynchronous messages.
- Performance was degradated when executed hundreds of processes at same time causing crashes on JBoss. AThreadPoolExecutor was added to SoapHandler.java to limit the number of processes executing at same time.
- Added a class to provide a central configuration for JBPM (ConfigurationManager.java), this classes uses Jgroups to replicate configuration modifications on runtime.
- Added static map (PROCESSES_IN_EXECUTION on JbpmContext.java) to provide a way to the cluster doesn't execute the same process at the same time. JGroups was added to support sending of messages between the machines to provide information about which processes are running.
- Added support for 2nd level cache cluster using EhCache and Jgroups, configuration on jbpm.hibernate.cfg.xml and ehcache_jbpm.xml
- Inclusion of table JBPM_NODE_EXECUTED, to track the path a process instance followed on bpel graph, we tried to use JBPM_TOKEN but it's unpredictable and confuse to track a path.
- XMLs messages with quotes ( " and ' ) has several issues when parsing to and from xerces, the quotes are lost due to the fact that XMLUtil.java encodes & to &amp;. This happens with other characters (>, <, space, -, & and #). It was necessary to modify ElementType.java to properly encode/unencode the xml files.
- Added support to XSL transformations using javax.xml.transform.Transformer in org.jbpm.bpel.sublang.xpath.cpqd.XSLTransformation file. The deploy of processes was altered to include xsd files on table JBPM_BYTEBLOCK
- JBPM_JOB has a design problem, it executes only one process by cycle, altered to execute as many as necessary, each one in a transaction with crash recovery. Also added a class to monitor
- Use of JBPM_LOG was altered, studies of database growth showed that this table was responsible for 30% of all database, so a configuration was added to choose to log or not to log, see DbLoggingService.java
- If a process crashes , the transaction is rolled back depending on exception type so all the graph is lost and if the process passed for a node that cannot be executed again the message can't be resended. StartInstance and ResumeInstance was rewritten to provide means to always save data.
- Added Xpath function to send email based on a xml with the data (org.jbpm.bpel.sublang.xpath.cpqd.SendEmail)
- When assigning a node that has several sub nodes with the same name, only the first node is assigned. XPathEvaluator.java (method selectOrCreateNodes) was fixed.
- When copying xmls nodes between different xmls namespace, the original namespaces are copied also. XPathEvaluator.java was fixed.
- LockMonitorThread.java monitors when a job is executing for a long time, but was not full implemented or used, it was modified to properly monitor the jobs.
- ByteBlockChopper.java had performance issues when glueing the chops because it created a new array for each chop, altered to create only one initial array and glue the chops in the right position.
- Added class JbossWebDescriptorTool.java on JBPM-BPEL-TOOLS, this class creates a jboss-web.xml to provide one context (/jbpmservices) for all processes deployed.
- The .war file deployed does not have version information, this causes the old processes instances crashs, several classes of JBPM-BPEL-TOOLS was modified to provide version information on classes generated and file names.
- On deploying a process definition create classes without using namespace for packaging, it causes a crash because of confliting xml nodes with the same name, modified to create packages for each namespace.
- Added column STATE_ to JBPM_PROCESSDEFINITION table, the definition is put in a activing state when deploying, so a process can be deployed with jbpm in use and the users can not access it until .war file is fully deployed.
- CatalogEntry is cached when used for the first time, so an external web service address could not be modified on runtime. The class was modified to support notification of urls for all the process using the addresses on ServiceCatalog.java, even in cluster.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522828#522828
14 years, 11 months
[Management Development] New message: "Re: Remote Access to Profile Service"
by Ramesh Reddy
JBoss development,
A new message was posted in the thread "Remote Access to Profile Service":
http://community.jboss.org/message/522813#522813
Author : Ramesh Reddy
Profile : http://community.jboss.org/people/rareddy
Message:
--------------------------------------------------------------
The above in JBoss 5.1.0 GA does not work, as is. There were couple issues.
The property name should be "proxyInterceptors" instead of "serverProxyInterceptors", and this property fragment needs to be added as additional property under "ProfileServiceProxyFactory" rather then replacing the whole bean fragment. Then when I started the the AS, I am getting the following errors
Caused by: java.io.NotSerializableException: org.jboss.aspects.security.AuthenticationInterceptor
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at java.util.ArrayList.writeObject(ArrayList.java:570)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
So, then I thought, I will extend the following classes and add "Serializable" interface to them and replace them in the XML fragment
org.jboss.aspects.security.AuthenticationInterceptor
org.jboss.aspects.security.RoleBasedAuthorizationInterceptor
Then I found that the constructor for "RoleBasedAuthorizationInterceptor" with signature
public RoleBasedAuthorizationInterceptor(AuthenticationManager authManager, AuthorizationManager authzManager)
{
this.authenticationManager = authManager;
this.authorizationManager = authzManager;
}
was not added until version 1.0.1 of "jboss-security-aspects.jar" file, but the version of jar bundled with JBoss AS 5.1.0 is 1.0.0 GA. This version has a constructor
public RoleBasedAuthorizationInterceptor(AuthenticationManager manager, RealmMapping realmMapping)
{
this.securityManager = manager;
this.realmMapping = realmMapping;
}
Here I was not sure what I can pass as "RealmMapping" object, do you have any suggestions?
Thanks.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/522813#522813
14 years, 11 months