1 2 Previous Next 16 Replies Latest reply on Sep 14, 2012 12:07 PM by ykravchenko

    Replacement for sun-jms-adapter.rar?

    rbwhitaker

      I asked a question about this earlier, and got no response. It might have been in the wrong forum...

       

      In the past, we've used sun-jms-adapter.rar to get JBoss AS 5.1 to receive messages from a JMS topic on a remote WebLogic server. (Version 10.3.) We're now in the process of upgrading to JBoss AS 7.1.1. Despite trying everything I could think of, I'm still unable to get this adapter to work.

       

      So my current question is, is there a newer/different resource adapter that I should be using to make this connection instead of this one?

       

      It is clear that the adapter's project page on java.net hasn't been updated in quite some time. Also, according to this document, this adapter supports JBoss 4 and WebLogic 8 and 9, though we had it working with WebLogic 10 and JBoss 5.1. This leads me to think there might be something to replace it. Any ideas?

        • 1. Re: Replacement for sun-jms-adapter.rar?
          jesper.pedersen

          You could try http://genericjmsra.java.net/. I know the HornetQ guys are working on JMS bridge for AS, so that could be an option too.

          • 2. Re: Replacement for sun-jms-adapter.rar?
            rbwhitaker

            Thanks, Jesper. I'll look into that and see if that works any better for me.

             

            Is there any chance that you (or anyone else) can confirm that sun-jms-adapter.rar is the wrong choice for JBoss 7? Or is it still possible that that's what I'll end up needing? At the moment, it's hard to tell if it's not working because I'm doing something dumb or if it's because it's incompatible with JBoss 7.

            • 3. Re: Replacement for sun-jms-adapter.rar?
              jesper.pedersen

              You should run http://docs.jboss.org/ironjacamar/userguide/1.1/en-US/html/tools.html#tools_rarinfo on the .rar to check. As to JMS - you will have a better chance of getting an answer in the AS user forum

              • 4. Re: Replacement for sun-jms-adapter.rar?
                rbwhitaker

                I just ran that rar-info tool that you pointed out on both sun-jms-adapter.rar, and genericra.rar that I downloaded from the link you provided in your initial response. I was a little surprised by the results.

                 

                The first part of the output file seems to say that sun-jms-adapter is compliant, while the genericra.rar is not. Is that something I should be worried about? Does it mean genericra.rar won't work?

                 

                Archive:C:/Users/rbwhitak/Desktop/sun-jms-adapter.rar
                JCA version:1.5
                Type:Bidirectional
                Reauth:No
                Compliant:Yes
                Native:No

                 

                 

                Archive:C:/Users/rbwhitak/Desktop/genericra.rar
                JCA version:1.5
                Type:Bidirectional
                Reauth:No
                Compliant:No
                Native:No
                • 5. Re: Replacement for sun-jms-adapter.rar?
                  jesper.pedersen

                  Depends on what the validator tools says about the .rar - there should be a .log file - or run the validator directly. Any ERROR must be fixed.

                  • 6. Re: Replacement for sun-jms-adapter.rar?
                    rbwhitaker

                    OK, let me make sure I understand this correctly. Here's my current understanding of what's happening here:

                     

                    • rar-info.bat runs a validator as a part of what it does.
                    • It writes [resource-adapter-name]-report.txt in the same location as the .rar file.
                    • If there are validation problems, a second file, [resource-adapter-name].rar.log is also written in the same location as rar-info.bat.

                     

                    Is that correct?

                     

                    I don't see a log file for sun-jms-adapter.rar, so I can only assume that if things go smoothly, there isn't one.

                     

                    There is one for genericra.rar, and it contains five WARNINGs and two ERRORs.

                    Severity: WARNING

                    Section: 20.7

                    Description: Invalid config-property-type for ManagedConnectionFactory.

                    Code: Class: com.sun.genericra.outbound.ManagedQueueConnectionFactory Property: ConnectionValidationEnabled Type: boolean

                     

                    Severity: WARNING

                    Section: 20.7

                    Description: Invalid config-property-type for ManagedConnectionFactory.

                    Code: Class: com.sun.genericra.outbound.ManagedTopicConnectionFactory Property: ConnectionValidationEnabled Type: boolean

                     

                    Severity: WARNING

                    Section: 20.7

                    Description: Invalid config-property-type for ManagedConnectionFactory.

                    Code: Class: com.sun.genericra.outbound.ManagedJMSConnectionFactory Property: ConnectionValidationEnabled Type: boolean

                     

                    Severity: WARNING

                    Section: 20.7

                    Description: Invalid config-property-type for ResourceAdapter.

                    Code: Class: com.sun.genericra.GenericJMSRA Property: SupportsXA Type: boolean

                     

                    Severity: WARNING

                    Section: 20.7

                    Description: Invalid config-property-type for ResourceAdapter.

                    Code: Class: com.sun.genericra.GenericJMSRA Property: UseFirstXAForRedelivery Type: boolean

                     

                    Severity: ERROR

                    Section: 13.4.2.3

                    Description: An AdminObject must implement javax.resource.Referenceable and java.io.Serializable interfaces if javax.resource.spi.ResourceAdapterAssociation is implemented Code

                    Code: com.sun.genericra.outbound.QueueProxy

                     

                    Severity: ERROR

                    Section: 13.4.2.3

                    Description: An AdminObject must implement javax.resource.Referenceable and java.io.Serializable interfaces if javax.resource.spi.ResourceAdapterAssociation is implemented Code

                    Code: com.sun.genericra.outbound.TopicProxy

                     

                    So these errors are what need to be fixed so that it is compliant?

                     

                    It is worth noting that when I deploy this resource adapter in JBoss 7, I see these same errors.

                    • 7. Re: Replacement for sun-jms-adapter.rar?
                      jesper.pedersen

                      Correct

                      • 8. Re: Replacement for sun-jms-adapter.rar?
                        ykravchenko

                        Hey RB Whitaker,

                         

                        I'm also trying to deploy genericjmsra.rar in Jboss7. Im trying to do that in order to integrate Tibco EMS with Jboss7 (genericjmsra seems to be the only way).

                         

                        However when deploying rar file I got exactly same issues as you have righ now.

                         

                        I didn't do a long  research of why that happened, but I could fix those errors quickly. I checked out code for genericjmsra from trunk and added Referenceable and Serializable interfaces to fix error.

                         

                        You can do same fix yourself of send me PM and I'll mail you updated genericjmsra.rar which deploys fine in Jboss7

                         

                          

                        Regards,

                        YK

                        • 9. Re: Replacement for sun-jms-adapter.rar?
                          jesper.pedersen

                          Contribute the changes back to the upstream project.

                          • 10. Re: Replacement for sun-jms-adapter.rar?
                            ykravchenko

                            Well I would love to commit changes but I have read-only access to SVN, but I'll email guys behind 'generic jms ra' to add those changes to trunk.

                            • 11. Re: Replacement for sun-jms-adapter.rar?
                              rbwhitaker

                              I considered this idea at one point, and backed out of it. It seemed like the Referenceable interface would require also adding code to manage references, which wasn't something I was interested in.

                               

                              But upon taking a second look at it, I was looking at javax.naming.Referenceable, not javax.resource.Referenceable, which extends the first interface, and adds in the ability to set a reference as well. That would likely eliminate the need for me to manage my own references, and sounds like it might be an option. (But it is obnoxious that there are two Referenceable interfaces, and that they are both in javax. I'm sure I'm not the first person to confuse the two.)

                               

                              Anyway, I'll give that a try, and see what it does. Thanks, Yevgen, for the suggestion.

                              • 12. Re: Replacement for sun-jms-adapter.rar?
                                rbwhitaker

                                Just an update... Adding in Referenceable (it already implements Serializable) to QueueProxy and TopicProxy fixed these errors and warnings.

                                 

                                I'm still having a heck of a time trying to get all of the appropriate configuration settings correct in standalone.xml or standalone-full.xml, but at least the resource adapter deploys successfully.

                                 

                                If anyone has an example configuration for JBoss for this resource adapter that they could share, it would go a very long way for me. Otherwise, if and when I get it working myself, I'll post it here.

                                • 13. Re: Replacement for sun-jms-adapter.rar?
                                  jesper.pedersen

                                  The sample deployment descriptor from the RAR info tool didn't get you started ?

                                  • 14. Re: Replacement for sun-jms-adapter.rar?
                                    rbwhitaker

                                    Yes and no. It got me started, but then shortly after getting started, I... got stuck. Big time.

                                     

                                    When I run rar-info, I get something that looks like this:

                                    <?xml version="1.0" encoding="UTF-8" standalone="no"?>

                                    <resource-adapters>

                                      <resource-adapter>

                                        <archive>C:\Users\rbwhitak\Desktop\The Bucket\genericra.rar</archive>

                                        <config-property name="LogLevel"/>

                                        <config-property name="CommonSetterMethodName"/>

                                        <config-property name="TopicClassName"/>

                                        <config-property name="QueueConnectionFactoryClassName"/>

                                        <config-property name="Password"/>

                                        <config-property name="UseFirstXAForRedelivery"/>

                                        <config-property name="UserName"/>

                                        <config-property name="ConnectionFactoryClassName"/>

                                        <config-property name="ConnectionFactoryProperties"/>

                                        <config-property name="JndiProperties"/>

                                        <config-property name="RMPolicy"/>

                                        <config-property name="XAConnectionFactoryClassName"/>

                                        <config-property name="SupportsXA"/>

                                        <config-property name="UnifiedDestinationClassName"/>

                                        <config-property name="QueueClassName"/>

                                        <config-property name="XAQueueConnectionFactoryClassName"/>

                                        <config-property name="DeliveryType"/>

                                        <config-property name="XATopicConnectionFactoryClassName"/>

                                        <config-property name="ProviderIntegrationMode"/>

                                        <config-property name="TopicConnectionFactoryClassName"/>

                                        <transaction-support>XATransaction</transaction-support>

                                        <connection-definitions>

                                          <connection-definition class-name="com.sun.genericra.outbound.ManagedQueueConnectionFactory" enabled="true" jndi-name="java:jboss/eis/QueueConnection" pool-name="QueueConnection" use-ccm="true" use-java-context="true">

                                            <config-property name="ClientId"/>

                                            <config-property name="ConnectionValidationEnabled"/>

                                            <config-property name="ConnectionFactoryJndiName"/>

                                            <xa-pool>

                                              <min-pool-size>0</min-pool-size>

                                              <max-pool-size>10</max-pool-size>

                                              <prefill>false</prefill>

                                              <use-strict-min>false</use-strict-min>

                                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                                              <pad-xid>false</pad-xid>

                                              <wrap-xa-resource>true</wrap-xa-resource>

                                            </xa-pool>

                                            <security>

                                              <application/>

                                            </security>

                                          </connection-definition>

                                          <connection-definition class-name="com.sun.genericra.outbound.ManagedTopicConnectionFactory" enabled="true" jndi-name="java:jboss/eis/TopicConnection" pool-name="TopicConnection" use-ccm="true" use-java-context="true">

                                            <config-property name="ClientId"/>

                                            <config-property name="ConnectionValidationEnabled"/>

                                            <config-property name="ConnectionFactoryJndiName"/>

                                            <xa-pool>

                                              <min-pool-size>0</min-pool-size>

                                              <max-pool-size>10</max-pool-size>

                                              <prefill>false</prefill>

                                              <use-strict-min>false</use-strict-min>

                                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                                              <pad-xid>false</pad-xid>

                                              <wrap-xa-resource>true</wrap-xa-resource>

                                            </xa-pool>

                                            <security>

                                              <application/>

                                            </security>

                                          </connection-definition>

                                          <connection-definition class-name="com.sun.genericra.outbound.ManagedJMSConnectionFactory" enabled="true" jndi-name="java:jboss/eis/Connection" pool-name="Connection" use-ccm="true" use-java-context="true">

                                            <config-property name="ClientId"/>

                                            <config-property name="ConnectionValidationEnabled"/>

                                            <config-property name="ConnectionFactoryJndiName"/>

                                            <xa-pool>

                                              <min-pool-size>0</min-pool-size>

                                              <max-pool-size>10</max-pool-size>

                                              <prefill>false</prefill>

                                              <use-strict-min>false</use-strict-min>

                                              <flush-strategy>FailingConnectionOnly</flush-strategy>

                                              <pad-xid>false</pad-xid>

                                              <wrap-xa-resource>true</wrap-xa-resource>

                                            </xa-pool>

                                            <security>

                                              <application/>

                                            </security>

                                          </connection-definition>

                                        </connection-definitions>

                                        <admin-objects>

                                          <admin-object class-name="com.sun.genericra.outbound.QueueProxy" enabled="true" jndi-name="java:jboss/eis/ao/QueueProxy" pool-name="QueueProxy" use-java-context="true">

                                            <config-property name="DestinationJndiName"/>

                                            <config-property name="DestinationProperties"/>

                                          </admin-object>

                                          <admin-object class-name="com.sun.genericra.outbound.TopicProxy" enabled="true" jndi-name="java:jboss/eis/ao/TopicProxy" pool-name="TopicProxy" use-java-context="true">

                                            <config-property name="DestinationJndiName"/>

                                            <config-property name="DestinationProperties"/>

                                          </admin-object>

                                        </admin-objects>

                                      </resource-adapter>

                                    </resource-adapters>

                                    But there's all of those config-property elements that need a value, and I'm having to do a lot of guessing to figure out what values they're supposed to be. Some are easier than others to guess. For instance, QueueClassName I think I can figure out, but ProviderIntegrationMode is not so obvious.

                                     

                                    Is there any more intelligent way to figure out what these values should be, besides guess and check?

                                    1 2 Previous Next