This content has been marked as final.
Show 2 replies
-
1. Re: Servlet and UserTransaction
starksm64 Feb 10, 2005 12:45 PM (in response to georges)You need to use a DataSource that has been deployed through the jboss jca layer. I have no idea what the DataBase.getDatabase() call does.
-
2. Re: Servlet and UserTransaction
georges Feb 10, 2005 4:34 PM (in response to georges)Hi!
Database.getConnection() does thispublic Connection getConnection(String _dataSource) throws Exception{ try { DataSource source = (DataSource) XIfsCache.get(_dataSource); if (source == null) { // Get a naming context InitialContext jndiContext = getInitialContext(); source = (DataSource) jndiContext.lookup(_dataSource); XIfsCache.put(_dataSource, source); } return source.getConnection(); } catch (Exception ex) { throw ex; } }
Is this okay? Inside the Session Beans or EJBs this works very well.
Only the Servlet doesn't want to work like it should.
Regards
Dan