> Don't reference Minerva classes in your code.  Just use
javax.sql.DataSource.
> Also, you should use java:comp/env/ lookups, but that's not relevent here.


ok. good point.


>
> > 4) *** RMI ServerException Stack Trace ( this is thrown and the
connection
> > is NOT returned to the pool )
> >     This is thrown when I try to call DatabaseUtility.closeConnection(
> > connection ); (notice I catch _everything_ in that method) and is _not_
> > thrown in the DatabaseUtility, but seems like it is thrown on the
attempt to
> > call the method.
> > java.rmi.ServerException: Transaction rolled
> > back:com/bebee/recommender/utility/DatabaseUtility
> > at
org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:300)
>
> Ok, you're missing out some details.  Are you calling an EJB from a
servlet?
>
> You haven't mentioned anything about what this EJB is doing.  What are you
> doing with transactions?  Are you getting the connection in the servlet
> and trying to close it from the EJB or something?
>


A servlet calls the bean it only passes primitive types (int, float, etc)
into the bean, the bean gets its own connections from the pool and closes
everything itself - the servlet simply determines which bean to call and
gets form parameters to pass into the bean, the results are returned from
the bean and are formatted into HTML to display them. The results may be Map
objects, or primitive types

This is, in fact not a transactional bean. All it does is retrieves data
from the database and shoves it into a Map to return. It is a session bean
because some of the lookups are a little complex (do not map directly to a
table)  -- and some of them require multiple row lookups - which you cannot
do with entity beans.

my ejb-jar.xml reads as follows: basically straight from the interest
example:

...cut out ...
    <session>
      <ejb-name>AVR</ejb-name>
          <home>com.bebee.recommender.client.ejb.interfaces.AVRHome</home>

<remote>com.bebee.recommender.client.ejb.interfaces.AVRInterface</remote>

<ejb-class>com.bebee.recommender.client.ejb.bean.xaction.AVRBean</ejb-class>
        <session-type>Stateless</session-type>
        <transaction-type>Bean</transaction-type>    // my understanding is
that this mean I will handle transactions, if any
    </session>
... cut out ...


> > 5) *** NullPointerException stack trace (sorry for the log format) this
is
> > thrown on the preparedStatement.close() call inside the bean at the end
of
> > the transaction (which is directly after the call to
connection.close() --
> > when I change the order of the calls, i.e. first close the prepared
> > statement then close the connection it works fine)
>
> This is a bug.  I'll look at this kind of fragility at some point.
>
> Toby.


Thanks Toby!
scott


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


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

Reply via email to