[wildfly-dev] Cassandra Subsystem

James R. Perkins jperkins at redhat.com
Fri Sep 19 17:24:03 EDT 2014


With Java 7 you can inherit the I/O too so you don't have to consume it.

pb.inheritIO();

On 09/19/2014 05:52 AM, David M. Lloyd wrote:
> Well, I have a bias of course, but it seems to me like you could just
> add Cassandra and its dependencies as modules and then launch it like this:
>
>       String javaHome = System.getProperty("java.home");
>       ProcessBuilder pb = new ProcssBuilder(
> 	javaHome + File.pathSeparator + "bin" + File.pathSeparator + "java",
>           ...jvm args...,
>           "-jar",
>           "jboss-modules.jar",
>           "-mp",
>           "modules",
>           "org.whatever.cassandra",
>           ...cassandra args...);
>       ...set up I/O redirection here...
>       Process p = pb.start();
>
> On 09/19/2014 03:12 AM, Heiko Braun wrote:
>>
>> David,
>>
>> I've been thinking more about your proposal to treat the cassandra daemon as a subprocess. Currently the cassandra dependencies are installed along side the module. How would I pass the classpath to the subprocess? Is there a way to get to the CP, similar to the way an URLClassLoader exposes it? Or how could it be achieved with JBoss modules?
>>
>> /Heiko
>>
>> On 26 Aug 2014, at 17:36, David M. Lloyd <david.lloyd at redhat.com> wrote:
>>
>>> Yeah, you could have a service that controls the cassandra daemon as a
>>> service and uses whatever its default network API is for communications.
>>>    This should be safe and reliable as of JDK 7.
>>>
>>> Just a suggestion in case embedding becomes an untenable proposition.
>>>
>>> On 8/26/14, 8:23 AM, Heiko Braun wrote:
>>>>
>>>> Not sure I can follow. Do you refer to the System.exit() calls?
>>>>
>>>> On 26 Aug 2014, at 15:10, David M. Lloyd <david.lloyd at redhat.com
>>>> <mailto:david.lloyd at redhat.com>> wrote:
>>>>
>>>>> One possible option might be to run it as a subprocess.
>>>
>>> --
>>> - DML
>>> _______________________________________________
>>> wildfly-dev mailing list
>>> wildfly-dev at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/wildfly-dev

-- 
James R. Perkins
JBoss by Red Hat



More information about the wildfly-dev mailing list