I'm trying to get the hibernate adapter to work with fds by testing out
2 tables from my database.
The two tables represent the make and model of a car.
Hibernate and fds seem to start up fine, the *.hbm.xml files are found but
I receive the following message.

Error: No Channels are available for use.

Anyone have any pointers? or is there a working example of how to use
fds with hibernate?


I have the following config:


Environment:
    Jdk  1.5.0_06
    JBoss 4.0.3sp1 with tomcat 5.5
    Hibernate 3.0.5
    FDS B2
    PostgreSQL 8.1.3
    Win xp pro sp2

flex-enterprise-services.xml -

<?xml version="1.0" encoding="UTF-8"?>
<services-config xmlns="http://www.macromedia.com/2005/flex-service-config">
   <services>
        <service-include file-path="flex-remoting-service.xml" />
        <service-include file-path="flex-proxy-service.xml" />
        <service-include file-path="flex-message-service.xml" />
        <service-include file-path="flex-data-service.xml" />
    </services>
    <security>
        <login-command
class="flex.messaging.security.TomcatLoginCommand" server="Tomcat"/>
    </security>
    <channels>
        <channel-definition id="my-amf"
class="mx.messaging.channels.AMFChannel">
            <endpoint
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amf"
class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>false</polling-enabled>
            </properties>
        </channel-definition>

        <channel-definition id="my-secure-amf"
class="mx.messaging.channels.SecureAMFChannel">
            <endpoint
uri="http://{server.name}:9100/{context.root}/messagebroker/amfsecure"
class="flex.messaging.endpoints.AMFEndpoint"/>
        </channel-definition>

        <channel-definition id="my-polling-amf"
class="mx.messaging.channels.AMFChannel">
            <endpoint
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling"
class="flex.messaging.endpoints.AMFEndpoint"/>
            <properties>
                <polling-enabled>true</polling-enabled>
                <polling-interval-seconds>8</polling-interval-seconds>
                <page-size>50</page-size>
                <packet-size>30KB</packet-size>
            </properties>
        </channel-definition>

        <channel-definition id="my-rtmp"
class="mx.messaging.channels.RTMPChannel">
            <endpoint
uri="rtmp://{server.name}:2038/{context.root}/rtmp"
class="flex.messaging.endpoints.RTMPEndpoint"/>
            <properties>
                <idle-timeout-minutes>20</idle-timeout-minutes>
                <client-to-server-maxbps>100K</client-to-server-maxbps>
                <server-to-client-maxbps>100K</server-to-client-maxbps>
                <page-size>50</page-size>
                <packet-size>30KB</packet-size>
            </properties>
        </channel-definition>
        <channel-definition id="my-http"
class="mx.messaging.channels.HTTPChannel">
            <endpoint
uri="http://{server.name}:{server.port}/{context.root}/messagebroker/http"
class="flex.messaging.endpoints.HTTPEndpoint"/>
        </channel-definition>

        <channel-definition id="my-secure-http"
class="mx.messaging.channels.SecureHTTPChannel">
            <endpoint
uri="https://{server.name}:9100/{context.root}/messagebroker/httpsecure"
class="flex.messaging.endpoints.HTTPEndpoint"/>
        </channel-definition>
    </channels>

    <logging>

        <target class="flex.messaging.log.ConsoleTarget" level="Error">
            <properties>
                <prefix>[Flex] </prefix>
                <includeDate>false</includeDate>
                <includeTime>false</includeTime>
                <includeLevel>false</includeLevel>
                <includeCategory>false</includeCategory>
            </properties>
            <filters>
                <pattern>Endpoint.*</pattern>
                <pattern>Service.*</pattern>
                <pattern>Configuration</pattern>
                <!-- <pattern>Message.*</pattern> -->
            </filters>
        </target>

    </logging>

    <system>
        <locale>
            <default-locale>en</default-locale>
            <supported-locale>de</supported-locale>
            <supported-locale>fr</supported-locale>
            <supported-locale>es</supported-locale>
        </locale>
              
        <redeploy>
            <enabled>true</enabled>
            <watch-interval>20</watch-interval>
           
<watch-file>{context.root}/WEB-INF/flex/flex-enterprise-services.xml</watch-file>
           
<watch-file>{context.root}/WEB-INF/flex/flex-proxy-service.xml</watch-file>
           
<watch-file>{context.root}/WEB-INF/flex/flex-remoting-service.xml</watch-file>
           
<watch-file>{context.root}/WEB-INF/flex/flex-message-service.xml</watch-file>
           
<watch-file>{context.root}/WEB-INF/flex/flex-data-service.xml</watch-file>
            <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
        </redeploy>      
    </system>

</services-config>





flex-data-service.xml -

<?xml version="1.0" encoding="UTF-8"?>
<service id="data-service" class="flex.data.DataService"
messageTypes="flex.data.messages.DataMessage">
   <destination id="Make">
        <adapter ref="hibernate" />
        <properties>
            <metadata>
                <identity property="oidmake"/>
            </metadata>
            <network>
                <session-timeout>20</session-timeout>
                <paging enabled="false" size="10" />
                <throttle-inbound policy="ERROR" max-frequency="500"/>
                <throttle-outbound policy="REPLACE" max-frequency="500"/>
            </network>
            <server>
               
<hibernate-entity>com.marketplacellc.db.vo.Make</hibernate-entity>
                <update-conflict-mode>PROPERTY</update-conflict-mode>
                <delete-conflict-mode>OBJECT</delete-conflict-mode>
                <fill-configuration>
                    <query-type>HQL</query-type>
                    <use-query-cache>false</use-query-cache>
                    <use-paging>false</use-paging>
                </fill-configuration>
            </server>
        </properties>
    </destination>
    <adapters>
        <adapter-definition id="actionscript"
class="flex.data.adapters.ASObjectAdapter"/>
        <adapter-definition id="java-dao"
class="flex.data.adapters.JavaAdapter"/>
        <adapter-definition id="hibernate"
class="flex.data.adapters.HibernateAdapter" default="true"/>
    </adapters>
</service>



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to