Hello everyone,

I've been trying to create dynamic "on-the-fly" destinations that read
from JMS Topics created using Java. The JMS Topic creation part is
working perfectly, the part that I am having problems with is the Flex
side, where I want to create dynamic destinations (this has to be done
calling a Java service method I think, at least everything I've read
about this is done on the Java side, using MessageBroker)...

The problem is when I try to get the MessageBroker, I am doing the
following:

String id = "newDestinationName";
String serviceId = "message-service";
MessageBroker broker = MessageBroker.getMessageBroker(null);
MessageService service = (MessageService) broker.getService(serviceId);
MessageDestination destination = (MessageDestination)
service.createDestination(id);

if (service.isStarted())
{
       destination.start();
}



This code is based on the BlazeDS samples as you might guess, the chat
room example.

The problem comes when I try to get the MessageBroker, I'm always
getting the MessageBroker as null and I don't know why, because
everything seems to be configured fine on the WEB.xml file.

My running evironment is BlazeDS running on JBoss 4.2.3, I create a Java
service and copy the .ear folder into my deploy folder, then inside the
.ear folder I copy the .war containing the BlazeDS files, and finally
the Flex application is running inside the BlazeDS.war. A more graphic
way could be:


+ JBoss deploy folder

|

| - - - JavaService.ear (My Java service)

           |- - META-INF

           |- - .....

           |- - ....

           |- - (A lot of compiled (.JAR) files, these files are the ones
that contain the code that creates the dynamic destination, which is not
working)

           |- - ...

           |- - ..

           |- - .

           |- - BlazeDs.war (BlazeDS files)

                |

                | - flexProject (My Flex project that uses the
dynamically created destination that connect to JMS topics)

                | - WEB-INF

                | - META-INF


Any thoughts or help on this matter would be greatly appreciated, thanks
in advance!!

Aurelio


Reply via email to