XADisk not as JCA Resource Adapter (StandaloneFileSystemConfiguration)

62 views
Skip to first unread message

Hobo Joe

unread,
May 18, 2015, 6:01:43 PM5/18/15
to xad...@googlegroups.com
All,
 I had a WAR that was written to access the OS filesystem directly (without going through wildlfy ResourceAdapater) and it looked like it was causing a memory leak and crashing our system. I could never get XADisk to work as a JCA Adapter (https://groups.google.com/forum/#!topic/xadisk/GPBFPfbvKEQ)  but did manage to get it to run inside a war by using StandaloneFileSystemConfiguration like this.. 
StandaloneFileSystemConfiguration configuration = new StandaloneFileSystemConfiguration(appdataRoot + File.separator + "mpd-xadisk", "id-1");
xafs = XAFileSystemProxy.bootNativeXAFileSystem(configuration);
logger.trace("\nBooting XADisk...\n");

try {
context = JAXBContext.newInstance(new Class[]{aobjectFactory.getClass()});
xafs.waitForBootup(-1L);
logger.trace("\nXADisk is now available for use.\n");
} catch (InterruptedException var2) {
var2.printStackTrace();
} catch (JAXBException var3) {
var3.printStackTrace();
}

By doing so it looks like my memory leak is gone. Can someone tell me if I am still compliant with my Wildfly 8.2 appserver. I did find

"When XADisk is not used as a JCA Resource Adapter, XADisk uses its own thin implementation of WorkManager (which is otherwise available from the JavaEE Server due to JCA contract). This WorkManager implementation relies on a JDK utility called ThreadPoolExecutor."

in the java doc but what does that mean in really basic terms? Do I have to deploy XADisk as XADiskConnection?

Thanks in advance.

Nitin Verma

unread,
May 19, 2015, 12:51:35 PM5/19/15
to xad...@googlegroups.com, stvgo...@gmail.com
Hi Hobo,

I do not have an idea about Wildfly, but I think it is not a good idea that Web-applications start their own threads. In this case, xadisk would end-up creating its own threads through the ThreadPoolExecutor.

I would advice you to attempt the resource-adapter deployment. I think the issue where you were stuck (https://groups.google.com/forum/#!topic/xadisk/GPBFPfbvKEQ) is not related to resource-adapter mode of deployment - if it occurs there, it can also occur when xadisk is not a resource-adapter. Did you try my latest post on that thread?

Thanks,
Nitin

Reply all
Reply to author
Forward
0 new messages