[JCA/JBoss] - Re: JBoss MS SQL Server DataSource Exception
by danielkalcevich
The server.log reports that Spring appears to find the object in the JNDI tree, and that it accesses it from the JNDI as a Remote DataSource. I have some code that is called on application startup in a Servlet just to try and see what the DataSource looks like. The code is:
| System.out.println( "Data Source: " + ctx.getBean( "dataSource" ) );
| DataSource ds = null;
| Connection c = null;
| try {
| ds = (DataSource)ctx.getBean( "dataSource" );
| System.out.println( "DataSource: " + ds );
| c = ds.getConnection();
| System.out.println( "Connection: " + c );
| } catch (SQLException e) {
| e.printStackTrace();
| } finally {
| if( c != null ) {
| try {
| c.close();
| } catch (SQLException e) {}
| }
| }
|
-----
log:
2006-11-03 14:00:22,939 DEBUG [org.springframework.jndi.JndiTemplate] Looking up JNDI object with name [java:/mdc]
2006-11-03 14:00:23,064 DEBUG [org.springframework.jndi.JndiObjectFactoryBean] Located object with JNDI name [java:/mdc]
....
2006-11-03 14:00:31,892 INFO [STDOUT] Data Source: org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@7ae165
2006-11-03 14:00:31,892 INFO [STDOUT] DataSource: org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@7ae165
2006-11-03 14:00:31,955 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] internalRegisterPool: registering pool with interval 900000 old interval: 450000
2006-11-03 14:00:31,955 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Created Connection proxy for invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=mdc, cacheID=14322087
2006-11-03 14:00:31,970 INFO [STDOUT] Connection: 14322087
2006-11-03 14:00:32,033 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Created Connection proxy for invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=mdc, cacheID=21168790
2006-11-03 14:00:32,095 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Created Statement proxy for invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=mdc, cacheID=13208327
2006-11-03 14:00:32,158 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Created ResultSet proxy for invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=mdc, cacheID=22616909
2006-11-03 14:00:32,361 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Closed Statement=13208327
2006-11-03 14:00:33,252 DEBUG [org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService] Created DatabaseMetadata proxy for invoker=jboss:service=invoker,type=jrmp, targetName=jboss.jca:service=DataSourceBinding,name=mdc, cacheID=188949142006-11-03 14:00:33,377 DEBUG [org.jboss.web.tomcat.tc5.TomcatDeployer] Initialized: {WebApplication: /C:/opt/jboss-4.0.5.GA/server/mdc/tmp/deploy/tmp21642MLSDataChecker-exp.war/, URL: file:/C:/opt/jboss-4.0.5.GA/server/mdc/tmp/deploy/tmp21642MLSDataChecker-exp.war/, classLoader: java.net.FactoryURLClassLoader@1e3bfb6:31702966} jboss.web:j2eeType=WebModule,name=//localhost/MLSDataChecker,J2EEApplication=none,J2EEServer=none
2006-11-03 14:00:33,377 DEBUG [org.jboss.web.WebModule] Started jboss.web.deployment:war=MLSDataChecker.war,id=1278716270
2006-11-03 14:00:33,377 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: jboss.web.deployment:war=MLSDataChecker.war,id=1278716270 dependent components: []
2006-11-03 14:00:33,392 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: MLSDataChecker.war
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983123#3983123
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983123
19Â years, 6Â months
[JBoss Seam] - Wildcards for no-conversation-view-id
by iradix
After looking at the source I'm thinking that using a wildcard to specify a no-conversation-view-id for a group of pages isn't currently possible. Is that right? Shouldn't it be? Generally I have several groups of pages that each constitute an individual conversation, but they are not really complex enough to merit pageflows in my opinion. They all look very much the same: the conversation is started by an action within pages.xml before the first page is displayed, and the rest of the pages/actions are conversation and protected either through a wildcard page-action or the @Conversational annotation. Otherwise, there is nothing to differentiate those internal pages from each other so it would be nice to just say:
<page view-id="/group-starter" action="#{conversation.begin}"/>
|
| <page view-id="/group/*" no-conversation-view-id="/group-starter" action="#{conversationUtils.conversational}"/>
rather than creating a page element for every individual page within the conversation.
This actually feeds into some other issues like the fact that wildcard actions occur first, which means that I cannot easily group all of the pages together (if my example /group-starter page was instead /group/group-starter, the #{conversationUtils.conversational} action would fire first never allowing the #{conversation.begin} action to occur) but maybe that's best left for another post.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983120#3983120
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983120
19Â years, 6Â months
[JCA/JBoss] - Re: JBoss MS SQL Server DataSource Exception
by danielkalcevich
My application-context.xml defines the following:
I have no resource-ref in either my web.xml or my jboss-web.xml.
To answer your question I am just deploying my application as a .WAR file into the deploy directory of my server config.
Another thing to note is that I switched over to debug mode and get the following in the log.
-----
Log:
13:38:43,813 DEBUG TransactionSynchronizationManager:84 - Initializing transaction synchronization
13:38:43,813 DEBUG TransactionInterceptor:84 - Getting transaction for com.firstam.mlsdatachecker.jdbc.manager.IConfigDataManager.getAllTimeZones
13:38:43,813 DEBUG SqlMapClientTemplate:84 - Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@1d22104] for iBATIS operation
13:38:43,844 DEBUG TransactionSynchronizationManager:84 - Bound value [org.springframework.jdbc.datasource.ConnectionHolder@29d50d] for key [org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@8f2588] to thread [main]
13:38:43,844 DEBUG TransactionSynchronizationManager:84 - Bound value [org.springframework.jdbc.datasource.ConnectionHolder@8523a0] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@9fa2fb] to thread [main]
13:38:43,860 DEBUG SqlMapClientTemplate:84 - Obtained JDBC Connection [2807456] for iBATIS operation
13:38:43,891 DEBUG TransactionSynchronizationManager:84 - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@29d50d] for key [org.jboss.invocation.jrmp.interfaces.JRMPInvokerProxy@8f2588] bound to thread [main]
13:38:44,188 INFO XmlBeanDefinitionReader:94 - Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
13:38:44,219 INFO SQLErrorCodesFactory:94 - SQLErrorCodes loaded: [DB2, Derby, HSQL, Informix, MS-SQL, MySQL, Oracle, PostgreSQL, Sybase]
13:38:44,563 DEBUG TransactionSynchronizationManager:84 - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@8523a0] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@9fa2fb] bound to thread [main]
13:38:44,641 DEBUG TransactionSynchronizationManager:84 - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@8523a0] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@9fa2fb] bound to thread [main]
13:38:44,641 DEBUG TransactionSynchronizationManager:84 - Retrieved value [org.springframework.jdbc.datasource.ConnectionHolder@8523a0] for key [org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy@9fa2fb] bound to thread [main]
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983118#3983118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983118
19Â years, 6Â months