1 2 Previous Next 19 Replies Latest reply on May 24, 2013 8:30 AM by ataylor

    Resource Adapter sample code

    raviteja457

      Hi All

       

      I am using jboss 7 I am requesting all can nayone send me the full sample code to configure resource adapter  .

       

      I know for jboss 7 it is default but i want to create the configure the resource adpater jndi  externally

       

      Thanks in advance

        • 1. Re: Resource Adapter sample code
          ataylor

          moved to correct forum

          • 2. Re: Resource Adapter sample code
            ataylor

            take a look at the jca-remote example, it does exactly this

            • 3. Re: Resource Adapter sample code
              raviteja457

              Hi Andy Taylor,

               

              I saw the example it is clear to understand and when i run the build.sh file its working fine withour error But my question is how to configure with jboss 7 and eclipse .

              And how to run when i am starting the standalone hornetq

              • 4. Re: Resource Adapter sample code
                ataylor

                I saw the example it is clear to understand and when i run the build.sh file its working fine withour error But my question is how to configure with jboss 7 and eclipse .

                Im not sure what you mean by run with eclipse but the example shows you how to configure with AS7

                • 5. Re: Resource Adapter sample code
                  raviteja457

                  I am using ubuntu so when i execute the build.sh file through terminal its works good but i am unable to understand for configuring with jboss7

                   

                   

                  Requesting you to provide me steps how to configure with jboss7.1

                  • 6. Re: Resource Adapter sample code
                    ataylor

                    take a look at the standalone-*.xml config files at pooled-connection-factory, other wise try reading the AS7 docs

                    • 7. Re: Resource Adapter sample code
                      raviteja457

                      Hi andy

                       

                      actually i am trying to connect standalone server with jboss 7

                      but,

                      i am getting the error  org.hornetq.ra.HornetQRAManagedConnectionFactory not a valid connection definition

                       

                      can you tell me why i am getting this ..

                      • 8. Re: Resource Adapter sample code
                        ataylor

                        actually i am trying to connect standalone server with jboss 7

                        but,

                        i am getting the error  org.hornetq.ra.HornetQRAManagedConnectionFactory not a valid connection definition

                        The configuration will be the same for standalone, simple configure your pooled connection factory as in th eexample.

                        • 9. Re: Resource Adapter sample code
                          raviteja457

                          Please see the my standalone.xml Andy

                           

                          i am deploying mdb in jboss/deployments adn my mdb wants to connect to stanalone hornetq server started by command prompt i am totally confusing

                           

                          please see below my standalone-full.xml and my mdb class

                           

                          And i am using @ResourceAdapter("hornetq-ra.rar")

                           

                          Very Greatful in advance

                          • 10. Re: Resource Adapter sample code
                            ataylor

                            you dont need an ra.xml file for AS7, simply configure the pooled connection factory as in the example i pointed you at.

                            • 11. Re: Resource Adapter sample code
                              raviteja457

                              My Problem is

                               

                              i have Jboss 7.1 and i downloaded hronetq

                               

                              after that  i written MDB class and deployed in jboss

                               

                              now i want to connect to remote hornetq using @resourceadapter

                               

                              how to configure with some example code

                              • 12. Re: Resource Adapter sample code
                                ataylor

                                The example i pointed you at does exactly this, just configure the pooled connection factory as needed. look at the pooled connection factories in standalone-example.xml.

                                • 13. Re: Resource Adapter sample code
                                  raviteja457

                                  I have configured a stand-alone HOrnetQ server and have few destinations in the HQ server. I have an java EE6 application which I have deployed in a JBoss AS 7 standalone server. I need to write an Message Driven Bean in my application running in JBoss Server and this bean should listen to my Topic which is in the standalone HQ Server.

                                  • 14. Re: Resource Adapter sample code
                                    ataylor

                                    I have configured a stand-alone HOrnetQ server and have few destinations in the HQ server. I have an java EE6 application which I have deployed in a JBoss AS 7 standalone server. I need to write an Message Driven Bean in my application running in JBoss Server and this bean should listen to my Topic which is in the standalone HQ Server.

                                    Thats exactly what the example i pointed you at does, although with a queue. Its pretty simple really. look for the following snippets

                                     

                                                         <netty-connector name="remote-netty" socket-binding="remote-messaging"/>

                                                   ..........

                                     

                                                        <pooled-connection-factory name="hornetq-remote-ra">

                                                            <transaction mode="xa"/>

                                                            <user>guest</user>

                                                            <password>password</password>

                                                            <connectors>

                                                                <connector-ref connector-name="remote-netty"/>

                                                            </connectors>

                                                            <entries>

                                                                <entry name="java:/RemoteJmsXA"/>

                                                            </entries>

                                                        </pooled-connection-factory>

                                     

                                                   ...............

                                     

                                     

                                            <socket-binding name="remote-messaging" port="5545" fixed-port="true"/>

                                    1 2 Previous Next