Announcement Announcement Module
Collapse
No announcement yet.
JDBC sharing JBoss connection pool w/ EJBs Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JDBC sharing JBoss connection pool w/ EJBs

    Hi,

    We're using JBoss 4.0.3 SP1 with Spring 1.2.8. The database is a little-known one, Transbase.

    The original application was a straight Spring web application using Tomcat. This application used DAOs implemented via Spring's JDBC abstraction layer. There were no transactions, our connection pool set auto commit to true.

    Some time later, outside forces replaced (most) of the business and data tiers with an EJB framework using JBoss. So, we had some business/data functions using JDBC and most using EJBs w/ Hibernate (non of the EJBs or Hibernate objects configured via Spring). We use the connection pool from JBoss as the datasource for the JDBCs.

    I noticed our simple JDBC writes/updates were not immediately being written to the database so I thought this may be due to the fact that the connections from JBoss's pool had transactions started on them, so I added a DataSourceTransactionManager and proxied the DAO interfaces still in use with a TransactionProxyFactory bean. This appeared to solve the problem.

    Hoever, I'm a little concerned as to whether this is acceptable or, more importantly, correct. I'm not very knowledgable concerning EJBs or JBoss and only slightly more regarding Spring, but I was hoping someone could comment on this configuration.

    Thanks in advance for any and all comments/advice.

  • #2
    I'm guessing that the TransactionProxyFactoryBean provided a commit which solved your problem. IMHO, I'd sooner know what's going on when I've fixed something. It would be useful to maybe turn up the logging to see what's happening with and without.

    Comment


    • #3
      Yah, sorry. I did use logging to verify that transactions were being created for the requests and being properly committed.

      My concern though is whether this kind of sharing is ok as far as JBoss using EJBs is concerned (i.e. non-EJB use of connections from JBoss's pool). Maybe this is too general a question which requires more information to answer.

      The reason I have concerns is because under extreme load, the Transbase database starts throwing some strange exceptions (e.g.:

      2007-03-12 11:18:28,437 ERROR [org.hibernate.util.JDBCExceptionReporter] -
      Java Client Version 3.0 Build xxxxxxxxxx)
      TB Java Server error <10>: Transbase Kernel <xxxxxxxxx> error report:
      psema(x1=1, x2=6, x3=2936)
      found semaphore (id=1, sema=6) dirty (from process 2936)
      psema(x1=1, x2=6, x3=0)
      something has gone wrong in an unforeseen way!
      please consult TRANSBASE team
      )

      and we begin to see some strange (overall) behavior. I'm not asking anyone to solve those issues, but I guess I would like some reassurance that sharing the connection pool (as described) is permitted. As I said, Transbase is not a very widely used database (as far as I can tell), but we are committed to its use.

      Comment

      Working...
      X