This content has been marked as final.
Show 3 replies
-
1. Re: JBoss 3.2.2, problem with Oracle
adrian.brock May 17, 2004 1:15 PM (in response to mdaffu)There is no jndi-name in ejb-jar.xml
There is one in jboss.xml -
2. Re: JBoss 3.2.2, problem with Oracle
mdaffu May 17, 2004 2:11 PM (in response to mdaffu)Adrian,
Thanks for the quick response
my files are the following:
ejb-jar.xml<ejb-jar> <enterprise-beans> <session> <display-name>SessionPKGen</display-name> <ejb-name>SessionPKGen</ejb-name> <home>pkgen.SessionPKGenHome</home> <remote>pkgen.SessionPKGen</remote> <ejb-class>pkgen.SessionPKGenBean</ejb-class> <session-type>Stateless</session-type> <transaction-type>Container</transaction-type> <resource-ref> <res-ref-name>jdbc/jdbc-oracle</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </session> </enterprise-beans> <assembly-descriptor> <container-transaction> <method> <ejb-name>SessionPKGen</ejb-name> <method-name>*</method-name> </method> <trans-attribute>Required</trans-attribute> </container-transaction> </assembly-descriptor> </ejb-jar>
jboss.xml<jboss> <enterprise-bean> <session> <ejb-name>SessionPKGen</ejb-name> <jndi-name>SessionPKGen</jndi-name> <resource-ref> <res-ref-name>jdbc/jdbc-oracle</res-ref-name> <jndi-name>java:/OracleDS</jndi-name> </resource-ref> </session> </enterprise-bean> </jboss>
oracle-ds.xmldatasources> <local-tx-datasource> <jndi-name>OracleDs</jndi-name> <connection-url>jdbc:oracle:thin:@133.90.80.82:1522:chilebd</connection-url> <driver-class>oracle.jdbc.driver.OracleDriver</driver-class> <user-name>chile</user-name> <password>chile</password> </local-tx-datasource> </datasources>
codetry { InitialContext ic = new InitialContext(); ds = (DataSource) ic.lookup("java:comp/env/jdbc/jdbc-oracle"); c = ds.getConnection(); ps = c.prepareStatement(OBTENER_SECUENCIA, ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY); rs = ps.executeQuery(); rs = ps.executeQuery(); rs.next(); id = rs.getBigDecimal(1); rs.close(); ps.close(); }
-
3. Re: JBoss 3.2.2, problem with Oracle
adrian.brock May 17, 2004 2:18 PM (in response to mdaffu)There is also no enterprise-bean in jboss.xml
there is an enterprise-beans
I added your question to the FAQ