ActiveJMS Java Bean Bridge - VB6 - ActiveX event listener
I tried to run a simple ActiveJMS client in VB6 with SUN's broker. All steps have been successful until trying to compile and run the ActiveX in VB6 code.
1) ************************************************************************************
Code from the ActiveJMS samples (below): Compiles, but runtime error '429' on the 'Set' statement.
Option Explicit
Private WithEvents objActiveJMS As ActiveJMS.ActiveJMS
...
Private Sub Form_Load()
Set objActiveJMS = New ActiveJMS.ActiveJMS
...
End Sub
2) ************************************************************************************
Changing the declaration and creation of objActiveJMS (below) made the application run until the event listener call. And then stop there with a runtime error 'java.lang.NoClassDefFoundError : org.activejms/ActiveJMS$2' .
Option Explicit
Dim objActiveJMS As Object
...
Private Sub Form_Load()
Set objActiveJMS = CreateObject("ActiveJMS.Bean.1")
lngProvider = objActiveJMS.getProvider("${default}")
lngConnectionFactory = objActiveJMS.lookupOnProvider(lngProvider, "EMERGENSYS")
lngConnection = objActiveJMS.createTopicConnectionOnTopicConnectionFactory(lngConnectionFactory, "admin", "admin")
lngReceiveSession = objActiveJMS.createTopicSessionOnTopicConnection(lngConnection, False, objActiveJMS.AutoAcknowledgeOnSession)
lngTopic = objActiveJMS.createTopicOnTopicSession(lngReceiveSession, "MCAD")
lngReceiver = objActiveJMS.createSubscriberOnTopicSession(lngReceiveSession, lngTopic, "", False)
objActiveJMS.activateMessageListenerOnMessageConsumer lngReceiver
objActiveJMS.startOnConnection (lngConnection)
...
End Sub
3) ***********************************************************************************
- I did not use the .tbl file ; It has not been generated by packager.
- I did also not use -clsid and -reg packager options.
- I have been able to generate the .dll fille and register it.
- I'm using j2sdk/jre 1.4.2_04
Thanks in advance.