Mohammed Eesa

Greenhorn
+ Follow
since May 06, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mohammed Eesa

hai all,
Iam using Oracle 9i.I am getting error When i access the Oracle Type through Java.

my Code is

con = connectionFactory.getConnection();
csmt = con.prepareCall("call PMS_PR_area_SIGN_CONTROL ( ?,?,?,?,?)");
csmt.setInt(1, groupId);
csmt.setString(2,startDate);
csmt.setString(3,endDate);
csmt.registerOutParameter(4,Types.ARRAY, "PMS_TY_TAB_SG_CNTRL");
csmt.registerOutParameter(5,Types.VARCHAR);
csmt.execute();
oracle.sql.ARRAY.oracleARRAY = (oracle.sql.ARRAY.ARRAY)csmt.getArray(4);
rs = oracleARRAY.getResultSet();
while (rs.next())
{
/**
below line gives error
*/
oracle.sql.STRUCT STRUCT struct=(oracle.sql.STRUCT.STRUCT)rs.getObject(2);//getting error at this line
Object[] resultObj = struct.getAttributes();

}
Stack Trace is
java.sql.SQLException: Internal Error
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:169)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:211)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:274)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.initCollElemTypeName(OracleTypeCOLLECTION.java:949)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.getAttributeType(OracleTypeCOLLECTION.java:996)
at oracle.jdbc.oracore.OracleNamedType.getFullName(OracleNamedType.java:91)
at oracle.sql.TypeDescriptor.initSQLName(TypeDescriptor.java:128)
at oracle.sql.TypeDescriptor.getName(TypeDescriptor.java:103)
at oracle.sql.StructDescriptor.getClass(StructDescriptor.java:415)
at oracle.sql.STRUCT.toJdbc(STRUCT.java:365)
at oracle.jdbc.oracore.OracleTypeUPT.unpickle80rec(OracleTypeUPT.java:236)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80rec_elems(OracleTypeCOLLECTION.java:553)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80rec(OracleTypeCOLLECTION.java:383)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.unpickle80(OracleTypeCOLLECTION.java:329)
at oracle.jdbc.oracore.OracleTypeCOLLECTION.unlinearize(OracleTypeCOLLECTION.java:218)
at oracle.sql.ArrayDescriptor.toJavaArray(ArrayDescriptor.java:501)
at oracle.sql.ARRAY.getArray(ARRAY.java:214)
at it.sella.pms.dao.TimeSheetReportDAO.getSignControlByGroup(TimeSheetReportDAO.java:409)

I am getting problem in Converting to STRUTS

Can any one help me.
Where can i find the objectives for java 5 Beta exam
i need answer for this question

import javax.ejb.*;
import javax.naming.*;
import javax.sql.*;
import javax.jms.*;
public class MySessionBean implements SessionBean {
private SessionContext sessionContext;
private Context jndiContext;
private Queue queue;
private UserDefinedClass userDefinedClass;
public void ejbCreate() {
try {
queue = (Queue) jndiContext.lookup("java:comp/env/jms/StockQueue");
} catch (NamingException ne) {
throw new EJBException(ne);
}
userDefinedClass = new UserDefinedClass();
}
public void ejbRemove() {...}
public void ejbActivate() {...}
public void ejbPassivate() {...}
public void setSessionContext(SessionContext sessionContext) {
this.sessionContext = sessionContext;
try {
jndiContext = new InitialContext();
} catch (NamingException ne) {
throw new EJBException(ne);
}
}
public class UserDefinedClass {
String dummy;
private DataSource dataSource;
public UserDefinedClass() {
try {
dataSource = (DataSource) jndiContext.lookup(
"java:comp/env/jdbc/MyDB");
} catch (NamingException ne) {
throw new EJBException(ne);
}
}
}
}
Which of the following are true about the conversational state?
A. The state of the variable sessionContext is kept after passivation/activation.
B. The state of the variable jndiContext is kept after passivation/activation.
C. The state of the variable queue is kept after passivation/activation.
D. The state of the variable userDefinedClass is kept after passivation/activation.
E. The container must be able to properly save and restore the reference to the
home and component interfaces of the EJBs stored in the instance��s
state even if the classes that implement the object references are not
serializable.
F. The container may use the object replacement technique
(java.io.ObjectOutputStream/ObjectInputStream) to externalize the home and
component references.
Can we have ejbActivate & ejbPassivate declared to be throw RemoteException.
But in JDiscuss Explanation was given like this.
"Container will kill the bean instance of methodA,and Container won't kill bean instance containing methodB".
what happends if methodA running in transactional context call methodB having "never" transactional attribute.Will the container kill the bean instance of methodB.

also what happened if non trasaction method call any method having Mandatory attribute.
I have a doubt whether Message-driven beans may be single-threaded or multi-threaded.
Is Message-driven bean must commit or rollback a transaction before onMessage returns?
I need some clarification about remove of Component interface of session bean

1. can we have transaction attribute for that methods?

2.remove method can be called "without exception", by both remote and local clients?
Can we Have more than one ejbCreate in MessageDriven Bean.
Iam Confusing about this.
Is <abstract-schema-name> deployment descriptor element in the ejb-jar file is mandatory.In Ed Roman it is specified as optional.
Is primary key class in CMP entity beans must be a legal Value Type in RMI-IIOP?
Iam doubt about this
The statement is true or false: While an enterprise bean instance is associated with a transaction it must not access resource manager specific transaction demarcation API

The answer is true.Can any one explain me?
CMP Beans is working fine eventhough,i am not declare any throws clause[CreateException] in ejbCreate().but spec say "you must throw ..."
Can any explain me why method setRollbackOnly() of Context Object cannot be invoked on ejbCreate(),Eventhough ejbCreate() will always run in transaction context of which create().