This content has been marked as final.
Show 2 replies
-
1. Re: Jboss EAP Remote EJB invoke transaction
wdfink May 28, 2016 4:58 PM (in response to erwin.etchart)Hello,
I don't get the problem. In general it depends on the transaction annotation whether a new transaction is created or not.
But I have never seen that the Tx manager creates a lot of files.
Could you expalin what you are doing? Maybe with the example code/project.
Did you see this in a high concurrent environment or is it just one invocation for test?
-
2. Re: Jboss EAP Remote EJB invoke transaction
erwin.etchart May 30, 2016 11:43 AM (in response to wdfink)Thanks for your response.
App B has:
@Stateless(name="TEST") @Remote(ITestService.class) public class TestService implements ITestService { @Override @Asynchronous public Future<TestDTO> doAsync(TestDTO dto){ return new AsyncResult<TestDTO>(execute(dto)); } public TestDTO execute(TestDTO dto) { dto.setResult("OK") return dto; } } @Remote public interface ITestService extends Serializable{ public Future<TestDTO> doAsync(TestDTO dto); }
App A has:
private SomeObjectResult doProcess(OtherRequest req) { ITestService service = getTestService("test", "beanName"); Future<TestDTO> future = null; future = service.doAsync(new TestDTO()); TestDTO result; try { result = future.get(20,TimeUnit.SECONDS); } catch (InterruptedException | ExecutionException | TimeoutException e) { } return result; } private ITestService getTestService(String moduleName, String beanName) { try{ Hashtable<String, String> jndiProperties = new Hashtable<String, String>(); jndiProperties.put(Context.URL_PKG_PREFIXES, URL_PKG_PREFIXES); Context context = new InitialContext(jndiProperties); String appName = ""; String distinctName = ""; // remote view fully qualified class name String viewClassName = ITestService.class.getCanonicalName(); StringBuilder lookupValue = new StringBuilder(); lookupValue.append("ejb:"); lookupValue.append(appName); lookupValue.append("/"); lookupValue.append(moduleName); lookupValue.append("/"); lookupValue.append(distinctName); lookupValue.append("/"); lookupValue.append(beanName); lookupValue.append("!"); lookupValue.append(viewClassName); return (ITestService) context.lookup(lookupValue.toString()); }catch(Exception e){ } }
The doProcess method is invoked when a web service is called.
Now happens in a test environment, the files created in this object store don't get accumulated, but I'm worried for the high disk usage.
Thanks