Re: [railo_talk] BlazeDS and 3.1

11 views
Skip to first unread message

Chris Velevitch

unread,
Apr 14, 2009, 9:28:04 PM4/14/09
to ra...@googlegroups.com
That works great. However, I have a web context call "test" and
http://localhost:8888/test/flex2gateway doesn't work. How do I setup
the gateways for each web context or what should the url be for my my
web context?


Chris
--
Chris Velevitch
Manager - Adobe Platform Users Group, Sydney
m: 0415 469 095
www.apugs.org.au

Adobe Platform Users Group, Sydney
April meeting: Mate Application Framework
Date: Mon 27th April 6pm for 6:30 start
Details and RSVP on http://groups.adobe.com/posts/353d7bc050

Roland Ringgenberg

unread,
Apr 17, 2009, 6:46:06 PM4/17/09
to Railo
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

FrognutUnl

unread,
Apr 24, 2009, 2:20:09 PM4/24/09
to Railo
Has there been any headway on the blazeDS integration with railo and
complex objects (queries, etc)?
> You can also setupBlazeDSin a multi web configuration. I have not
> > That works great. However, I have a web context call "test" andhttp://localhost:8888/test/flex2gatewaydoesn'twork. How do I setup
> > the gateways for each web context or what should the url be for my my
> > web context?
>
> > Chris
> > --
> > Chris Velevitch
> > Manager - Adobe Platform Users Group, Sydney
> > m: 0415 469 095www.apugs.org.au
>
> > Adobe Platform Users Group, Sydney
> > April meeting: Mate Application Framework
> > Date: Mon 27th April 6pm for 6:30 start
> > Details and RSVP onhttp://groups.adobe.com/posts/353d7bc050- Hide quoted text -
>
> - Show quoted text -

CF

unread,
May 25, 2009, 6:10:37 AM5/25/09
to Railo
Hi there,

On 24 Apr., 20:20, FrognutUnl <wmiddendo...@gmail.com> wrote:
> Has there been any headway on theblazeDSintegration with railo and
> complex objects (queries, etc)?

I never saw an answer to this question... any news on this?

Chris

Roland Ringgenberg

unread,
May 26, 2009, 8:41:23 AM5/26/09
to Railo
Hi Chris,

Sorry it took some more time than expected, but yes there is news. We
could eliminate the bugs, queries are now returned as an
ArrayCollection of Objects per row, Structs now return all types and
if you use the [RemoteClass(alias="path.to.cfc")] annotation in your
AS class and then set returntype="path.to.cfc" on your cffunction you
will get back a object typed to your related AS class.

I'm not sure when the fixes will be online available, but after Gert
announcing the first week of June as the next target, it should not
take that long anymore.

Where to go from here?

There is still a lot we can do, so we will be very happy for all that
start to use and test the integration, and of course even start to
help solving further issues. At the end of the day, this is an open
source integration, right? ;). In any case, you will be able to look
at the code and maybe even find optimisations, so feel free to do it.

What I want to look at next is to also use special Railo options like
the magic functions (implicit getters/setters) and the different
settings of the this and variables scopes, I definitively have on my
list things like being able to properly send java and groovy object
from Railo and integrate push (longpolling etc.). Railo has a very
nice way how java classes can call into Railo, so we should be able to
implement also messaging over Railo instead of JMS etc.

I still have to test some special cases, but it looks quite good that
you finally will be able to use Railo with BlazeDS sometime next week.
Thx for your patience!

Roland

FrognutUnl

unread,
May 27, 2009, 10:20:11 AM5/27/09
to Railo
This is AWSOME! Can't wait to see it available.
> > Chris- Hide quoted text -

ethyreal

unread,
Jun 19, 2009, 11:07:07 PM6/19/09
to Railo
This is fantastic. I just deployed this, piece of cake. I did have
to change my vo's to all lowercase. I look forward to camel case
support.

Thanks Again!
> > you finally will be able to use Railo withBlazeDSsometime next week.

Paul Kukiel

unread,
Jun 19, 2009, 11:38:20 PM6/19/09
to ra...@googlegroups.com
Upgrade to 3.1.0.16 and VO's can be camelCase :)

Paul.

CFList

unread,
Jun 20, 2009, 4:28:06 AM6/20/09
to ra...@googlegroups.com
Any idea about when XML will be supported as a return type?

Cheers

Chris
Reply all
Reply to author
Forward
0 new messages