[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4228 Preferred master node for HASingleton
by galder.zamarreno@jboss.com
I've got JBAS-5161 ready to be committed. There's a small change though that I wanted to pass through the forum before committing it:
Instead of parsing host:port manually by searching for colon and then calling substring, I thought it'll be easier and less cumbersome to parse it via an URI. To do this, I create a new URI from "cluster://" + preferredMaster, i.e.
/**
| * Create a URI instance from the given preferred master.
| *
| * @param str contains the String format of the preferred master.
| * @return an instance of URI, or null if the str cannot be parsed.
| */
| protected URI createUri(String str)
| {
| try
| {
| return new URI("cluster://" + preferredMaster);
| }
| catch (URISyntaxException use)
| {
| log.debug("Cannot extract URI from " + preferredMaster, use);
| }
|
| return null;
| }
and then call getHost() and getPort() on the URI instance to get the host/ip and port values.
Even though a new URI is inmutable, I haven't cached it cos preferred master can be changed at runtime. URI is just an identifier in comparison to URL, so I don't expect creation of URI instances to be costly.
To make sure I didn't introduce any bugs with this, I've also created PreferredMasterElectionPolicyUnitTestCase that contains several standalone tests that probe different inputs for preferred master.
Brian, I'll send you a patch before committing in case you wanna have a look to it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128202#4128202
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128202
18 years, 1 month
[Design of JBoss jBPM] - Re: Major GPD Changes for Extenders
by pbolle
Hi Koen,
Thank you for your answer. I tried to build GPD via eclipse but have the following problems.
First a addend the missing plugin dependency org.eclipse.jface.text and add the jar dom4j.jar to classpath.
The then 6 new errors occur in JpdlContentProvider:
- The method addEdges(Node, Element) in the type JpdlContentProvider is not applicable for the arguments (Node, Transition[], Element)
- The method addNodes(NodeContainer, Element) in the type JpdlContentProvider is not applicable for the arguments (NodeContainer, NodeElement[], Element)
- The type JpdlContentProvider must implement the inherited abstract method AbstractContentProvider.addEdges(Node, Element)
- The type JpdlContentProvider must implement the inherited abstract method AbstractContentProvider.addNodes(NodeContainer, Element)
- The type JpdlContentProvider must implement the inherited abstract method AbstractContentProvider.getEdgeSemanticElement(Node, Element, int)
- The type JpdlContentProvider must implement the inherited abstract method AbstractContentProvider.getNodeSemanticElement(NodeContainer, Element, int)
For me it looks like if there are some commits are missing to get all work.
Regards Philipp
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128187#4128187
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128187
18 years, 1 month
[Design of POJO Server] - Classloader leak in BasicThreadPool
by bstansberry@jboss.com
Discussion of solution to http://jira.jboss.org/jira/browse/JBCOMMON-41[/url] . For background on the problem see [url]http://www.jboss.com/index.html?module=bb&op=viewtopic&t=129122 .
I intend to solve this by having the BasicThreadPool set an appropriate TCCL on the pool thread:
1) in the ThreadPoolFactory, just after creating the thread.
2) when a thread is returned from a task, by subclassing ThreadPoolExecutor and overriding afterExecute().
What TCCL gets set will be configurable by an injectable policy:
| package org.jboss.util.loading;
|
| public interface ClassLoaderSource {
|
| /**
| * Returns the classloader provided by this object; may return null.
| */
| ClassLoader getClassLoader();
|
| }
|
If no ClassLoaderSource is injected, the TCCL will be set to null.
In common-core I'll add a basic SimpleClassLoaderSource which simply returns getClass().getClassLoader(). In the AS, that would return the classloader that loads $JBOSS_HOME/lib.
Somewhere else, (AS server module?) I'll add another impl that exposes a start() and stop() method. In start it will cache a weak ref to the current TCCL, and will thereafter return that. This could be injected into the jboss.system:service=ThreadPool pool; it will return the classloader in effect when conf/jboss-service.xml is deployed. That seems like a reasonable default for that service, or at least is likely closest to the "typical" behavior of the current thread pool.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128107#4128107
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128107
18 years, 2 months