[jboss-user] [Messaging, JMS & JBossMQ] - Re: import org.jboss.mq.server.jmx.Queue

milind.uc do-not-reply at jboss.com
Tue Jun 19 00:24:39 EDT 2007


Hi Jhowell,

Fell pleasure to see your reply thanks for your reply.Actually my application is a desktop application .Ad when I made the mysql connection  using datasource nad if I keep  <use-java-context>true</use-java-context>  then I got the error that the not able to lookup my jndi name.
My datasource file is    as below ::


  | 
  | 
  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <!-- $Id: mysql-ds.xml,v 1.3 2004/09/15 14:37:40 loubyansky Exp $ -->
  | <!--  Datasource config for MySQL using 3.0.9 available from:
  | http://www.mysql.com/downloads/api-jdbc-stable.html
  | -->
  | 
  | <datasources>
  |   <local-tx-datasource>
  |     <jndi-name>DBConnection</jndi-name>
  | 	<use-java-context>false</use-java-context> 
  | 	<connection-url>jdbc:mysql://localhost:3306/millind_demo?autoReconnect=true</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>root</user-name>
  |     <password>root</password>
  |      <max-pool-size>60</max-pool-size>
  | 	  <min-pool-size>10</min-pool-size>
  | 	  <blocking-timeout-millis>5000</blocking-timeout-millis>
  |       <idle-timeout-minutes>15</idle-timeout-minutes>
  |       <!-- correspondinasdg type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
  |       <metadata>
  |          <type-mapping>mySQL</type-mapping>
  |       </metadata>
  |   </local-tx-datasource>
  | 
  | </datasources>
  | 
  | 


thast why I kept it <use-java-context>false</use-java-context> as I accessed the datasoure from plain pojo.. Everything is fine with this fashion but when I used "getBinaryStream" on sql resultset it give the errorrs like below::


anonymous wrote : 
  | java.lang.reflect.UndeclaredThrowableException
  | 	at $Proxy3.getBinaryStream(Unknown Source)
  | 	at in.etp.dim.ui.gfhfghfgh.main(gfhfghfgh.java:57)
  | Caused by: java.lang.IllegalAccessException: Method=public abstract java.io.InputStream java.sql.ResultSet.getBinaryStream(int) throws java.sql.SQLException does not return Serializable
  | 	at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.doResultSetMethod(WrapperDataSourceService.java:478)
  | 	at org.jboss.resource.adapter.jdbc.remote.WrapperDataSourceService.invoke(WrapperDataSourceService.java:252)
  | .


I  am now going to call it from seesion bean. But not understanding how to create proxy and how to call it from plain pojo...

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055451#4055451

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055451



More information about the jboss-user mailing list