Regarding performance impact if I do DB accessing coding in comp Controller
This is my project requirement, I have to use some com compoment which in turn fetches data from the database. I am using a java com bridge tool to do this. This tool is generating the java proxy classes for the VB com component.
I am using java proxy classes( This class files are using JNI to connect to VB COM compnent and fetch the data from DB) in my webdynpro component controller.
The architecture is aas below
WEBDYNPRO >> JAVA Classes object( generated by the JAVA- COM bridge tool ) >> JAVA-COM bridge tool >> VB COM+ Component >> SQL server.
Performance :- first time it is OK but for Consecutive calls the application is going down very visibly and after 4 iteration it hangs . When I look at the log I am getting this
Message : Exception occured during processing of Web Dynpro application com/oreqsrch/com.oreqsrchapp.OReqSrchApp.
The causing exception is nested.
com.sap.tc.webdynpro.services.session.LockException: Thread SAPEngine_Application_Thread[impl:3]_36 failed to acquire exclusive lock on client session ClientSession(id=(J2EE9536400)ID1120562150DB11245826542790956137End_1159630423). Existing locks: LockingManager(ThreadName:SAPEngine_Application_Thread[impl:3]_36, exclusive client session lock:
ClientSessionLock(SAPEngine_Application_Thread[impl:3]_9), shared client session locks: ClientSessionSharedLockManager(), app session locks: ApplicationSessionLockManager(), current request: com/oreqsrch/com.oreqsrchapp.OReqSrchApp).
Hint: Take a thread dump of the server node to find the blocking thread that causes the problem.
Is this issue because I have return the code data access code in the component controller rather wrting in some beans ?
My questions regarding
What would the performance impact if write the DB access code in the webdynpro component controller rather than writing in a bean or an EJB?( I know ideally DB access code has to write in Bean or EJB ).
Please address this with respedct to performance point of view .