1 2 Previous Next 19 Replies Latest reply on Jun 19, 2007 12:24 AM by milind.uc Go to original post
      • 15. Re: import org.jboss.mq.server.jmx.Queue
        milind.uc

        I would like to thanks the way you reply me its pleasurable.... Well still I am working on the same track as I said previouslly that I am getting the problem with the geMessagecounter() metod that will get soloved as I used inside the session stateless bean......

        Well but still I alwayes get the values zero for getScheduledMessage and still didnt know how to count that how many messages receiver acepted..

        Rigth now I am working on the notfications ..As soon as the messages comes into the queue I want to do the automatic udpation for statastics of how many shceduled .pending and recived which will then dipalyed to user in the gui..


        Well now I am going to used Message Drievrn Bean as I am also not o much familliar with it and want o chech the behaviour of the onMessage Method I think that method itsellf migth give me soloution and tyes there is method og queueMbean.addNotificationListener(). This method I am not able to used because of theire parameters.


        Well if uyou have any suggestions for the notifcation then please sufggeset me :)

        • 16. Re: import org.jboss.mq.server.jmx.Queue
          milind.uc

          I am using MDB which able tolisen on only one particular wqueue how will make my single mdb to listen on more than on e queue I am trying it by using the tag of <destination-jndi-name>queue/D</destination-jndi-name> but iis not working it is working fine with onlye one mdb.....

          If anyone knows it then please tell me how to used for the more than one destination in single md..

          • 17. Re: import org.jboss.mq.server.jmx.Queue
            milind.uc

            Anyone know how to acesses the datasource connection remotely I am getting the problem with getBinaryStream I kept the <use-java-context>false</use-java-context> in my datasource file

            • 18. Re: import org.jboss.mq.server.jmx.Queue
              jay.howell

              Not really sure why you are getting an error with the getBinaryStream function, but you really should not use this design. It is an anti pattern. Please look at the footnote at the bottom of this wiki article. http://wiki.jboss.org/wiki/Wiki.jsp?page=ConfigDataSources
              You definitly want to put a Session facade in front of the db calls.
              Jay:)

              • 19. Re: import org.jboss.mq.server.jmx.Queue
                milind.uc

                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::



                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...

                1 2 Previous Next