KamranZaidi

Greenhorn
+ Follow
since Jul 18, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by KamranZaidi

Hi Rogers & Valentin,

Here is My DD (ejb-jar.xml)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>CourseInformation</display-name>
<enterprise-beans>
<session>
<display-name>CourseDAO</display-name>
<ejb-name>CourseDAO</ejb-name>
<home>coursedao.CourseDAOHome</home>
<remote>coursedao.CourseDAO</remote>
<ejb-class>coursedao.CourseDAOBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>CourseDAO</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>



NOTE:- I am using CMT and BMT according to your comment J2EE doesn�t support the both transaction in single scope.
Hi Valentin Tanase,

Follwing are answeer of your questions...

Ans 1) No I am handling the transaction in DAO.

Ans 2) I have insert the data into six tables the error is occur in one table but it will insert the data into Manager table. According to my logic the complete transaction will roll back if error occur inserting a data into any table.

Ans 3) The following run time exception.

Start server side stack trace:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.IllegalStateException: Transaction does not exist
java.lang.IllegalStateException: Transaction does not exist
at weblogic.transaction.internal.TransactionManagerImpl.rollback(TransactionManagerImpl.java:298)
at coursedao.CourseDAOBean.insertMainCourseRequest(CourseDAOBean.java:316)
at coursedao.CourseDAOBean_dnar3d_EOImpl.insertMainCourseRequest(CourseDAOBean_dnar3d_EOImpl.java:149)
at coursedao.CourseDAOBean_dnar3d_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:441)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:382)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:726)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:377)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
End server side stack trace
; nested exception is:
java.lang.IllegalStateException: Transaction does not exist


Ans 4) Yes, I used SQLException but I changed in my code and using Exception.
Hi,

I am inserting the data into six tables under single transaction scope. Basically, if any errors occur it should role back the complete transaction.

My question is Can I use entity beans (CMP) and DAO based Stored Procedure calls from a session bean, both in a single transaction?

Right now even though there are problems with some of the procedure calls, the transaction scope is not working and didn�t role back.

I have tried many methods, including using java.sql.Connection based trasactions, CMT based trasactions (i.e. allowing the container to handle the trasactions) and finally using BMT in the session bean and CMT for the entity beans. All the same i am still faced with this problem.

Here is my code for the last of these options.

try{
ut = ejbContext.getUserTransaction();

ut.begin();
// Insert data into Course Table
insertCourse(courseRequestDTO);
// Insert data into CourseSession table
insertCourseSession(courseRequestDTO);
// Insert data into Course Request table
insertExternalInfo(courseRequestDTO);
// Insert data into Manager Table
insertManager(courseRequestDTO);
// Insert data into Employee table by Using CMP
insertEmployee(employeeDTO, courseRequestDTO);
//Insert data into CourseRequest Table
insertCourseRequest(courseRequestDTO);

ut.commit();

}
catch(SQLException se){
ut.rollback();
System.out.println("<<<< Transaction failed >>>>>");
}

<b>Can anyone help me on this ?</b>

Thanks and Regards

<b>Kamran</b>
<email>Kamranzaidi@hotmail.com</email>
Hi,

Could you tell me GlobalORBFactory class file where I can find because I add one by one all file in my class path but I got same error. I already add rt.jar file in my environment class path.

Error is Given Below

java.lang.NoClassDefFoundError: com.ibm.CORBA.iiop.GlobalORBFactory
at com.ibm.ejs.oa.EJSORBImpl.class$(EJSORBImpl.java:44)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:195)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:93)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:65)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:385)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:260)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:166)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:98)
at com.ibm.ws.naming.util.WsnInitCtx.<init>(WsnInitCtx.java:79)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:137)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:674)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:255)
at javax.naming.InitialContext.init(InitialContext.java:231)
at javax.naming.InitialContext.<init>(InitialContext.java:207)
at tisalesPackage.TiSalesJavaClient.getInitialContext(TiSalesJavaClient.java:47)
at tisalesPackage.TiSalesJavaClient.getDbConnection(TiSalesJavaClient.java:61)
at tisalesPackage.TiSalesJavaClient.main(TiSalesJavaClient.java:90)
Exception in thread "main"


Regards
Kamran
19 years ago
Hello,
I am using websphere 4.0 AE. I have implemented SSL 128 bit in websphere 4.0 AES but my internet browser is capable 56 bit encrption it is not running.When I downloaded the patch of 128 bit encryption from microsoft site its runing but my site in future many customers will hit which don't have this 128 patch. How it is possible 56 bit compliant when customer hit its display Please help me or tell me any setting which application server compliant 56 bit encryption.

Best Regards
KAMRAN
21 years ago