Highlighted

Blaze DS with Weblogic

davidbaker29

26-06-2008

Hi



I'm adding a Flex front-end to an existing J2EE application.
In production the app is deployed as an Ear file in Weblogic 9.2.
I've added the BlazeDS war file into this Ear file and deployed it
successfully to Weblogic 9.2.



In my development environment I deploy both the ear file and
the blaze war file it contains in exploded format. This means that
in Flex Builder 3 Pro, if I go to Project Properties -> Flex
Server, I can set the 'root folder' property equal to the root of
my exploded Blaze war file. Similarly in the Flex Compiler section
of Project Properties, I can set the -services argument equal to
the path to my services-config.xml file. This allows me to hook my
Flex front-end to my Java classes in the ear file.



But in production I'll need to deploy my app as an ear file
and package Blaze as a war file within it. How then can I set the
root folder and the path to my services-config.xml file? It won't
be possible to browse to the files as they're bundled in the war
file.



Thanks

David

Replies

Highlighted

SujitG

02-07-2008

Hi,



You need not add entire BlazeDS war file. You just have to
include the required jar files of BlazeDS, all the jar files in
WEB-INF/lib folder of the BlazeDS war are the required files to be
added into your web application. Also you need to create a folder
WEB-INF/flex in your web application and create services-config.xml
and other configuration files as in WEB-INF/flex folder in the
BlazeDS war file.



Regarding the path to your services-config.xml. This file is
compiled into your Flex application when you compile it. If you can
look at the compiler arguments of your Flex project you can find
the path to the services-config.xml.

If you want you can create the services-config.xml file in
any location and point to it in the compiler arguments. If you do
this make sure the end point URLs are hard coded in the
services-config.xml are proper and also there should be one
services-config.xml file in the WEB-INF/flex folder of your web
application for the BlazeDS/LCDS to use it to open up ports.



When you point to your web applications root directory for
the Flex builder, Flex Builder will use this location to load the
services-config.xml and when you give the context-root etc, these
will be used to replace the tokens in curls bracket in your
services-config.xml so that the URL to send a request to your web
application is formed based on the data you entered in the new
project dialogue of Flex Builder.



Hope this helps.