Thursday 19 February 2015

JTATransaction: javax.transaction.InvalidTransactionException.

 JTATransaction:  javax.transaction.InvalidTransactionException.


For Weblogic server, for complete domain level we set JTA time out.
If we are facing JTATransaction Time out exceptions, please go and increase the time.
If Application Modules are not commited between this time automatically it will be roll backed and you will get exception.


JAVA : TempFile : How to avoide InputStrem Loss.

TempFile : How to avoide InputStrem Loss.


1. Assume we are getting stream from UCM, and we are going to use that stream in our java code.
If file is huge then we may not handle that stream for long time, It will be lost after some time.

So to avoide that we can get the stream and write it in to tempFile, and then we can use that stream for further coding.

Below is the sample code:


ADF BC Passivation and Activation

ADF BC Passivation and Activation


In production, when there will be high workload and many concurrent users, ADF will start to passivate Application Module instances.

Along with that if we want to passivate and activate our Transient Variable also then we need to check the Passivate check box in Transient Attribute level.

For More info - http://andrejusb.blogspot.in/2010/01/demystifying-adf-bc-passivation-and.html

Eg: Assume we have "DummyAttr" as Transient variable, and we are assigning value as shown below.


User will open Departments page and will set transient attribute value as shown above.
Will try to open next page - Employees, and will get java.lang.NullPointerException. Why? Let's find an answer in detail log. When there is not enough space in the pool (during next submit in our test case), and Application Module instance is passivated, transient DummyAttr attribute value was not passivated and this means it was simply lost:

So always good practice is to Pssivate our Transient variables and keep running in production with out fail.