This is my first posting here, and I am pretty new at jboss, so be kind.

I have an application (EAR) that I have built in Sun RI and have working
nicely, and now I am trying to deploy it to jboss.  I have made some minor
modifications to the WAR xml file since tomcat is under the 2.2 Web
Application spec and Sun RI is using 2.3.  (jboss 2.2.1, tomcat 3.2.1, jdk
1.3)

Here are my issues, and I am not totally sure on this, since everything
deploys nicely and there is relatively little debug information to go on:
I cannot access my session beans or connection cache (not sure which).

Here is my code:


jboss.jcml
-------------------------------------------------------
  <!-- JDBC -->
  <mbean code="org.jboss.jdbc.JdbcProvider"
name="DefaultDomain:service=JdbcProvider">
     <attribute
name="Drivers">org.hsql.jdbcDriver,com.sybase.jdbc2.jdbc.SybDriver</attribut
e>
  </mbean>

  <mbean code="org.jboss.jdbc.XADataSourceLoader"
name="DefaultDomain:service=XADataSource,name=ctpdb">
    <attribute name="PoolName">ctpdb</attribute>
    <attribute
name="DataSourceClass">org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImp
l</attribute>
    <attribute name="URL">jdbc:sybase:Tds:localhost:2638</attribute>
    <attribute name="JDBCUser">user</attribute>
    <attribute name="Password">sql</attribute>
  </mbean>


ejb-jar.xml (for Press Bean)
-------------------------------------------------------
<?xml version="1.0" encoding="Cp1252"?>
<!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>
  <description>no description</description>
  <display-name>Press</display-name>
  <enterprise-beans>
    <session>
      <description>no description</description>
      <display-name>Press</display-name>
      <ejb-name>Press</ejb-name>
      <home>com.ctp.corp.PressHome</home>
      <remote>com.ctp.corp.Press</remote>
      <ejb-class>com.ctp.corp.PressBean</ejb-class>
      <session-type>Stateless</session-type>
      <transaction-type>Bean</transaction-type>
      <security-identity>
        <description></description>
        <use-caller-identity></use-caller-identity>
      </security-identity>
      <resource-ref>
        <res-ref-name>jdbc/ctpDataSource</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
        <res-sharing-scope>Shareable</res-sharing-scope>
      </resource-ref>
    </session>
  </enterprise-beans>
</ejb-jar>


jboss.xml (for Press Bean)
-------------------------------------------------------
<?xml version="1.0" encoding="Cp1252"?>

<jboss>
  <enterprise-beans>
    <session>
      <ejb-name>Press</ejb-name>
      <jndi-name>Press</jndi-name>
    </session>
  </enterprise-beans>

  <resource-managers>
    <resource-manager>
      <res-jndi-name>java:/ctpdb</res-jndi-name>
      <res-name>jdbc/ctpDataSource</res-name>
    </resource-manager>
  </resource-managers>
</jboss>



Within my code, here is my lookups from both the JavaBean (to the Press
Bean) and from the Press Bean to the Connection Cache:

code from ShowPressBean.java
-------------------------------------------------------
java.lang.Object obj = ctx.lookup("java:comp/env/ejb/Press");
PressHome pressHome = (PressHome)PortableRemoteObject.narrow(obj,
PressHome.class);


code from PressBean.java
-------------------------------------------------------
ds = (DataSource) ctx.lookup("java:comp/env/jdbc/ctpDataSource");


Any help would be appreciated.

Jason E. Trust
Sun Certified - Java 2 Programmer
Sybase Certified - EAServer Developer

Corporate Technology Partners, Inc.
[EMAIL PROTECTED]
720.482.0706 x251


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to