Hi Chris,
Not sure if you received my answer, I maybe clicked on the wrong link.
Just in case here a second try.
Unfortunately the MessageBrokerServlet is not yet added in the web.xml
files of the Railo 3.1.0.012
Resin and war downloads. So you will either have to use Railo Express
or you need to add following
code manually to your web.xml (you can find this code also in the
Railo Express under
{railo-root}/etc/webdefault.xml):
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-
class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-
value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>MessageBrokerServlet</servlet-name>
<url-pattern>/flex2gateway/*</url-pattern>
</servlet-mapping>
After a restart of your server your link should work.
You can also setup BlazeDS in a multi web configuration. I have not
yet tested this with the virtual
hosts setup described on the Railo website (Railo-Resin-Apache), but
it works perfectly with separate
context roots.
I have setup JBoss 4.2.2 with two railo.war's ({JBoss-root}/server/
default/deploy/railo1.ware and
{JBoss-root}/server/default/deploy/railo2.war - unzipped). If you now
add the MessageBrokerServlet
and the flex2gateway mapping to the two WEB-INF/web.xml files you can
instantiate individual
servlets for your contexts.
To be able to have separate MessageBrokerServlets instantiated you
have to give them different id's,
otherwise you will run into a
flex.messaging.config.ConfigurationException when you start JBoss.
One way to do this is to provide the messageBrokerId as an init-param:
<servlet>
<servlet-name>MessageBrokerServlet</servlet-name>
<display-name>MessageBrokerServlet</display-name>
<servlet-class>flex.messaging.MessageBrokerServlet</servlet-
class>
<init-param>
<param-name>services.configuration.file</param-name>
<param-value>/WEB-INF/flex/services-config.xml</param-
value>
<param-name>messageBrokerId</param-name>
<param-value>railo2MessageBroker</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
Another way would be to instantiate the MessageBrokerServlets at
runtime in a bootstrap.jar.
You can find more information about the runtime configuration in the
BlazeDS documentation,
but the first way should work fine. However, these strategies should
even work in a clustered setup.
Hope this helps.
Success,
Roland
On Apr 15, 3:28 am, Chris Velevitch <
chris.velevi...@gmail.com> wrote:
> That works great. However, I have a web context call "test" andhttp://localhost:8888/test/flex2gatewaydoesn't work. How do I setup