I do a lookup for it using java:/defaultSourceName. I tried the call and it
works so far as I can execute the SQL (i.e.
if the table doesn't exist, it throws an exception), but it doesn't get
written to the database. And when I checked for
a transaction. It appears that JBoss thinks I'm not in a transaction (did a
test by using setAutoCommit and it was happy
to let me set the autocommit).

By the way, the call to the JDBC connection is many layers down from the EJB,
i.e.
--> i.e. SequenceBean calls databaseutility calls getConnection and executes
the update.
don't think it would hurt though.
The deployment descriptor was actually imported from IPlanet6 and it worked
fine there.




hs


"danch (Dan Christopherson)" wrote:

> How does your bean get its database connection? Your descriptor doesn't
> have a resource reference in it.
>
> Hoong-Shen Wong wrote:
>
> > Hi,
> >
> > I am trying out to make a Stateless Session Bean with Container managed
> > Transactions auto-commit
> > at the end of a transaction, but it does not appear to do so. The
> > following is the deployment descriptor we are using
> > for the Bean. It writes to the database, but does not appear to commit
> > the SQL statement and the data is lost.
> > Is there something wrong with the deployment descriptor or something
> > else?
> >
> > Thanks in advance.
> >
> >
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
> > JavaBeans 1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
> >
> > <ejb-jar>
> >   <enterprise-beans>
> >     <session>
> >       <ejb-name>SequenceEJB</ejb-name>
> >       <home>com.ecquaria.ecbeans.util.sequence.SequenceHome</home>
> >       <remote>com.ecquaria.ecbeans.util.sequence.SequenceEJB</remote>
> >
> > <ejb-class>com.ecquaria.ecbeans.util.sequence.SequenceBean</ejb-class>
> >       <session-type>Stateless</session-type>
> >       <transaction-type>Container</transaction-type>
> >     </session>
> >   </enterprise-beans>
> >   <assembly-descriptor>
> >     <container-transaction>
> >       <method>
> >  <ejb-name>SequenceEJB</ejb-name>
> >  <method-name>*</method-name>
> >       </method>
> >       <trans-attribute>Required</trans-attribute>
> >     </container-transaction>
> >   </assembly-descriptor>
> > </ejb-jar>
> >
> >
> >
> > _______________________________________________
> > 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


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

Reply via email to