A tah, entendi, eu tentei utilizar o 1.5 e nao consegui tbm :(

bom valeu

Em 6 de agosto de 2010 12:49, Marcelo Caser <[email protected]>escreveu:

> Parece que realmente esse problema foi contorno na versao Spring BlazeDZ
> Integration 1.5, como é tido no texto:
>
> Using Hibernate to handle persistence concerns is quite common in Spring
> applications. A common problem arises, though, when attempting to directly
> use Hibernate-loaded entities in AMF messages with BlazeDS. In essence, the
> default BlazeDS serialization mechanism tries to walk the entire object
> graph, forcing initialization of any lazily loaded associations that might
> be encountered. This generally leads either to LazyInitialization errors, or
> (if using a solution such as Spring's OpenSessionInViewFilter) the
> undesirable n+1 selects scenario. The other problem that arises is when
> associations are eagerly loaded, but still wrapped in a Hibernate-specific
> collection or proxy, which can cause unexpected results in the way the
> association gets serialized.
>
> Spring BlazeDS Integration 1.5+ provides a simple solution that will allow
> the direct use of Hibernate entities in AMF messages. A special Spring-aware
> PropertyProxy (a BlazeDS-specific interface for customizing serialization)
> is automatically installed that delegates to the Spring 3.0
> ConversionService to allow for additional property conversion logic to be
> plugged in during the serialization/deserialization process.
>
> Como ainda estou usando a versao Spring BlazeDS Integration 1.0.3 não tive
> a oportunidade de testar essa nova versao do Integration...
>
>
> Em 6 de agosto de 2010 11:34, Fabio Ebner <[email protected]> escreveu:
>
> Boa, agora deixa eu te perguntar uma coisa, com o BLAZEDS 4 segundo eles ja
>> foi resolvido o problema de LAZY LOAD, eu utilizo o hibernate porem a parte
>> de conexao eu utilizo o session factory e tudo mais, eu tenho que memso
>> assim, fazer o filtro de
>>>
>>> OpenSessionInViewFilter para contornar esse erro?
>>>
>>
>>
>> Em 6 de agosto de 2010 10:33, Marcelo Caser <[email protected]>escreveu:
>>
>> @Fabio
>>>
>>> Acho que eh erro de configuração, não estou usando o spring security
>>> ainda no meu projeto.. vou te passar mais ou menos como está o meu
>>> projeto... estou trabalhando com Hibernate 3.2.4, Spring 3.0.3, Spring
>>> Integration 1.0.3
>>> Se não estiver trablhando com hibernate desconsidere as configurações.
>>>
>>> Arquivo web.xml
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <web-app id="WebApp_ID" version="2.5"
>>>     xmlns="http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance";
>>>     xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>>> http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd";>
>>>
>>>     <display-name>SAEO</display-name>
>>>
>>>     <!-- =========== FILTROS ============= -->
>>>     <filter>
>>>         <filter-name>HibernateFilter</filter-name>
>>>         <filter-class>
>>>
>>> org.springframework.orm.hibernate3.support.OpenSessionInViewFilter
>>>         </filter-class>
>>>     </filter>
>>>
>>>     <filter-mapping>
>>>         <filter-name>HibernateFilter</filter-name>
>>>         <url-pattern>/*</url-pattern>
>>>     </filter-mapping>
>>>
>>>     <!-- ************* LISTENER ************* -->
>>>
>>>     <listener>
>>>         <listener-class>flex.messaging.HttpFlexSession
>>>         </listener-class>
>>>     </listener>
>>>
>>>     <listener>
>>>
>>> <listener-class>org.springframework.web.context.ContextLoaderListener
>>>         </listener-class>
>>>     </listener>
>>>
>>>     <!-- *************** SERVLETS ************ -->
>>>     <servlet>
>>>         <servlet-name>flex</servlet-name>
>>>
>>>         <servlet-class>org.springframework.web.servlet.DispatcherServlet
>>>         </servlet-class>
>>>         <load-on-startup>1</load-on-startup>
>>>     </servlet>
>>>
>>>     <servlet-mapping>
>>>         <servlet-name>flex</servlet-name>
>>>
>>>         <url-pattern>/messagebroker/*</url-pattern>
>>>     </servlet-mapping>
>>>
>>>     <!-- ************* PARAMETROS ************* -->
>>>     <context-param>
>>>
>>>         <param-name>contextConfigLocation</param-name>
>>>         <param-value>/WEB-INF/spring/app-config.xml
>>>         </param-value>
>>>     </context-param>
>>>
>>>     <welcome-file-list>
>>>         <welcome-file>index.html</welcome-file>
>>>     </welcome-file-list>
>>>
>>> </web-app>
>>>
>>> Arquivo app-config.xml
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>      xmlns:security="http://www.springframework.org/schema/security";
>>>
>>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>> xmlns:context="http://www.springframework.org/schema/context";
>>>      xmlns:tx="http://www.springframework.org/schema/tx";
>>>
>>>     xsi:schemaLocation="
>>>         http://www.springframework.org/schema/beans
>>>
>>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>>         http://www.springframework.org/schema/security
>>>
>>> http://www.springframework.org/schema/security/spring-security-2.0.4.xsd
>>>
>>>         http://www.springframework.org/schema/context
>>>
>>> http://www.springframework.org/schema/context/spring-context-2.5.xsd
>>>         http://www.springframework.org/schema/tx
>>>         http://www.springframework.org/schema/tx/spring-tx-2.5.xsd";>
>>>
>>>     <!-- Datasource used by Hibernate -->
>>>     <bean id="dataSource"
>>> class="org.springframework.jndi.JndiObjectFactoryBean">
>>>         <property name="jndiName" value="java:comp/env/jdbc/FLEX-DS" />
>>>         <property name="resourceRef" value="true" />
>>>     </bean>
>>>
>>>     <bean
>>>
>>> class="org.springframework.context.annotation.CommonAnnotationBeanPostProcessor"
>>> />
>>>
>>>     <context:component-scan base-package="br.org.teste">
>>>         <context:include-filter type="annotation"
>>>             expression="org.springframework.stereotype.Service" />
>>>     </context:component-scan>
>>>
>>>     <!-- Hibernate Session Factory -->
>>>     <bean id="sessionFactory"
>>>
>>> class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
>>>         <property name="dataSource" ref="dataSource" />
>>>         <property name="configurationClass"
>>> value="org.hibernate.cfg.AnnotationConfiguration" />
>>>         <property name="configLocation"
>>> value="classpath:hibernate.cfg.xml" />
>>>     </bean>
>>>
>>>     <!-- Transaction manager for a single Hibernate SessionFactory -->
>>>     <bean id="transactionManager"
>>>
>>> class="org.springframework.orm.hibernate3.HibernateTransactionManager">
>>>         <property name="sessionFactory">
>>>             <ref bean="sessionFactory" />
>>>         </property>
>>>     </bean>
>>>
>>>     <tx:annotation-driven transaction-manager="transactionManager"
>>>         proxy-target-class="true" />
>>>
>>>     <bean id="hibernateTemplate"
>>> class="org.springframework.orm.hibernate3.HibernateTemplate">
>>>         <property name="sessionFactory">
>>>             <ref bean="sessionFactory" />
>>>         </property>
>>>     </bean>
>>>
>>>     <bean id="hibernateDaoSupport"
>>>
>>> class="org.springframework.orm.hibernate3.support.HibernateDaoSupport"
>>>         abstract="true">
>>>         <property name="sessionFactory">
>>>             <ref bean="sessionFactory" />
>>>         </property>
>>>         <property name="hibernateTemplate">
>>>             <ref bean="hibernateTemplate" />
>>>         </property>
>>>     </bean>
>>>
>>>     <bean id="hibernateUtil" class="core.hibernate.HibernateUtil"
>>>         parent="hibernateDaoSupport" />
>>>
>>> </beans>
>>>
>>> Arquivo flex-servlet.xml (Servlet config. de acordo com o web.xml)
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>     xmlns:flex="http://www.springframework.org/schema/flex"; xmlns:xsi="
>>> http://www.w3.org/2001/XMLSchema-instance";
>>>     xmlns:context="http://www.springframework.org/schema/context";
>>>     xsi:schemaLocation="
>>>         http://www.springframework.org/schema/beans
>>>
>>> http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
>>>
>>>         http://www.springframework.org/schema/context
>>>
>>> http://www.springframework.org/schema/context/spring-context-2.5.xsd
>>>
>>>         http://www.springframework.org/schema/flex
>>>         http://www.springframework.org/schema/flex/spring-flex-1.0.xsd";>
>>>
>>>     <flex:message-broker>
>>>         <flex:message-service default-channels="my-amf" />
>>>     </flex:message-broker>
>>>
>>> </beans>
>>>
>>> Arquivo services-config.xml
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>> <services-config>
>>>
>>>     <services>
>>>         <service-include file-path="remoting-config.xml" />
>>>         <!--<service-include file-path="proxy-config.xml" />
>>>         <service-include file-path="messaging-config.xml" /> -->
>>>         <default-channels>
>>>             <channel ref="my-amf" />
>>>         </default-channels>
>>>     </services>
>>>
>>>     <security>
>>>         <login-command class="flex.messaging.security.TomcatLoginCommand"
>>> server="Tomcat"/>
>>>         <!-- Uncomment the correct app server
>>>         <login-command class="flex.messaging.security.TomcatLoginCommand"
>>> server="JBoss">
>>>         <login-command class="flex.messaging.security.JRunLoginCommand"
>>> server="JRun"/>
>>>         <login-command
>>> class="flex.messaging.security.WeblogicLoginCommand" server="Weblogic"/>
>>>         <login-command
>>> class="flex.messaging.security.WebSphereLoginCommand" server="WebSphere"/>
>>>         -->
>>>
>>>         <!--
>>>         <security-constraint id="basic-read-access">
>>>             <auth-method>Basic</auth-method>
>>>             <roles>
>>>                 <role>guests</role>
>>>                 <role>accountants</role>
>>>                 <role>employees</role>
>>>                 <role>managers</role>
>>>             </roles>
>>>         </security-constraint>
>>>          -->
>>>     </security>
>>>
>>>     <channels>
>>>
>>>         <channel-definition id="my-amf"
>>> class="mx.messaging.channels.AMFChannel">
>>>             <endpoint 
>>> url="http://{server.name}:{server.port}/{context.root}/messagebroker/amf";
>>> class="flex.messaging.endpoints.AMFEndpoint"/>
>>>             <properties>
>>>
>>> <invalidate-session-on-disconnect>true</invalidate-session-on-disconnect>
>>>             </properties>
>>>         </channel-definition>
>>>
>>>         <channel-definition id="my-secure-amf"
>>> class="mx.messaging.channels.SecureAMFChannel">
>>>             <endpoint 
>>> url="https://{server.name}:{server.port}/{context.root}/messagebroker/amfsecure";
>>> class="flex.messaging.endpoints.SecureAMFEndpoint"/>
>>>             <properties>
>>>                 <add-no-cache-headers>false</add-no-cache-headers>
>>>
>>> <invalidate-session-on-disconnect>true</invalidate-session-on-disconnect>
>>>             </properties>
>>>         </channel-definition>
>>>
>>>         <channel-definition id="my-polling-amf"
>>> class="mx.messaging.channels.AMFChannel">
>>>             <endpoint 
>>> url="http://{server.name}:{server.port}/{context.root}/messagebroker/amfpolling";
>>> class="flex.messaging.endpoints.AMFEndpoint"/>
>>>             <properties>
>>>                 <polling-enabled>true</polling-enabled>
>>>                 <polling-interval-seconds>4</polling-interval-seconds>
>>>
>>> <invalidate-session-on-disconnect>true</invalidate-session-on-disconnect>
>>>             </properties>
>>>         </channel-definition>
>>>
>>>         <!--
>>>         <channel-definition id="my-http"
>>> class="mx.messaging.channels.HTTPChannel">
>>>             <endpoint 
>>> url="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 
>>> url="https://{server.name}:{server.port}/{context.root}/messagebroker/httpsecure";
>>> class="flex.messaging.endpoints.SecureHTTPEndpoint"/>
>>>             <properties>
>>>                 <add-no-cache-headers>false</add-no-cache-headers>
>>>             </properties>
>>>         </channel-definition>
>>>         -->
>>>     </channels>
>>>
>>>     <logging>
>>>         <target class="flex.messaging.log.ConsoleTarget" level="Debug">
>>>             <properties>
>>>                 <prefix>[BlazeDS] </prefix>
>>>                 <includeDate>true</includeDate>
>>>                 <includeTime>true</includeTime>
>>>                 <includeLevel>true</includeLevel>
>>>                 <includeCategory>true</includeCategory>
>>>             </properties>
>>>             <filters>
>>>                 <pattern>Endpoint.*</pattern>
>>>                 <pattern>Service.*</pattern>
>>>                 <pattern>Configuration</pattern>
>>>             </filters>
>>>         </target>
>>>     </logging>
>>>
>>>     <system>
>>>         <redeploy>
>>>             <enabled>false</enabled>
>>>             <!--
>>>             <watch-interval>20</watch-interval>
>>>
>>> <watch-file>{context.root}/WEB-INF/flex/services-config.xml</watch-file>
>>>
>>> <watch-file>{context.root}/WEB-INF/flex/proxy-config.xml</watch-file>
>>>
>>> <watch-file>{context.root}/WEB-INF/flex/remoting-config.xml</watch-file>
>>>
>>> <watch-file>{context.root}/WEB-INF/flex/messaging-config.xml</watch-file>
>>>
>>> <watch-file>{context.root}/WEB-INF/flex/data-management-config.xml</watch-file>
>>>             <touch-file>{context.root}/WEB-INF/web.xml</touch-file>
>>>              -->
>>>         </redeploy>
>>>     </system>
>>>
>>> </services-config>
>>>
>>> Tente por enquanto retirar as configurações do Spring Security do seu
>>> projeto, comente a linha:
>>>
>>> <flex:secured /> do arquivo applicationContext.xml antes de fazer
>>> qualquer conferencias com o que te passei.
>>>
>>> Qualquer dúvida estamos ai.
>>>
>>> Abrass...
>>>
>>>
>>>
>>> Em 6 de agosto de 2010 10:05, Kleber Gracia 
>>> <[email protected]>escreveu:
>>>
>>> Olá pessoal. Deixa eu perguntar uma coisa, estou com um problema que é o
>>>> seguinte acho que voces devem saber me explicar, estou com um botao em um
>>>> form como faço para bloquealo em de outra tela, a tela que ele esta é a
>>>> Login e na outra LoginCommand estou instanciando da seguinte forma na tela
>>>> LoginCommand var login :
>>>>
>>>> Login = new Login();
>>>> login.btnEnviar.enabled = false;
>>>>
>>>> Mas não esta fazendo nada, simplesmente parace que nem executa, fiz um
>>>> alert abaixo e mostra os dados mas parece que nao executa. Grato.
>>>> At.
>>>> Kleber Gracia Soares
>>>> Equipe Galaxyz trabalhando para você
>>>> www.galaxyz.com.br
>>>> Telefone: |44| 3233-2039
>>>> Cel.: |44| 9960-0298 - Tim
>>>> Msn: [email protected]
>>>> Skype: kleber.gracia
>>>> Email: [email protected]
>>>> "Tudo posso naquele que me fortalece!" (Fl 4,13).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Em 6 de agosto de 2010 09:42, Fabio Ebner <[email protected]> escreveu:
>>>>
>>>> Marcelo consegui add a web securit e agora a aopaliance porem eu recebo
>>>>> o seguinte erro:
>>>>>
>>>>> Caused by: org.springframework.beans.factory.BeanCreationException:
>>>>> Error creating bean with name '_messageBroker': Cannot resolve reference 
>>>>> to
>>>>> bean '_messageBrokerLoginCommand' while setting bean property
>>>>> 'configProcessors' with key [2]; nested exception is
>>>>> org.springframework.beans.factory.BeanCreationException: Error creating 
>>>>> bean
>>>>> with name '_messageBrokerLoginCommand': Cannot resolve reference to bean
>>>>> 'org.springframework.security.authenticationManager' while setting
>>>>> constructor argument; nested exception is
>>>>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>>>>> named 'org.springframework.security.authenticationManager' is defined
>>>>>
>>>>> e o meu WEB.XML esta assim:
>>>>>     <listener>
>>>>>
>>>>> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
>>>>>     </listener>
>>>>>
>>>>>     <listener>
>>>>>         <listener-class>flex.messaging.HttpFlexSession</listener-class>
>>>>>     </listener>
>>>>>
>>>>>     <context-param>
>>>>>         <param-name>flex.class.path</param-name>
>>>>>
>>>>> <param-value>/WEB-INF/flex/hotfixes,/WEB-INF/flex/jars</param-value>
>>>>>     </context-param>
>>>>>
>>>>>     <servlet>
>>>>>         <servlet-name>flexspring</servlet-name>
>>>>>
>>>>> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
>>>>>         <init-param>
>>>>>             <param-name>contextConfigLocation</param-name>
>>>>>             <param-value></param-value>
>>>>>         </init-param>
>>>>>         <load-on-startup>1</load-on-startup>
>>>>>     </servlet>
>>>>>
>>>>>     <servlet-mapping>
>>>>>         <servlet-name>flexspring</servlet-name>
>>>>>         <url-pattern>/messagebroker/*</url-pattern>
>>>>>     </servlet-mapping>
>>>>>
>>>>>
>>>>> e o meu applicationContext.xml esta assim:
>>>>>
>>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>>> <beans xmlns="http://www.springframework.org/schema/beans";
>>>>>     xmlns:flex="http://www.springframework.org/schema/flex";
>>>>>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>>>>>     xmlns:context="http://www.springframework.org/schema/context";
>>>>>     xsi:schemaLocation="
>>>>>         http://www.springframework.org/schema/beans
>>>>>
>>>>> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
>>>>>         http://www.springframework.org/schema/flex
>>>>>         http://www.springframework.org/schema/flex/spring-flex-1.0.xsd
>>>>>         http://www.springframework.org/schema/context
>>>>>
>>>>> http://www.springframework.org/schema/context/spring-context-3.0.xsd";>
>>>>>     <flex:message-broker>
>>>>>         <flex:message-service
>>>>>
>>>>> default-channels="my-streaming-amf,my-longpolling-amf,my-polling-amf" />
>>>>>         <flex:secured />
>>>>>     </flex:message-broker>
>>>>>     <context:component-scan base-package="br" />
>>>>> </beans>
>>>>>
>>>>> --
>>>>> Você recebeu esta mensagem porque está inscrito na lista "flexdev"
>>>>> Para enviar uma mensagem, envie um e-mail para
>>>>> [email protected]
>>>>> Para sair da lista, envie um email em branco para
>>>>> [email protected]
>>>>> Mais opções estão disponíveis em
>>>>> http://groups.google.com/group/flexdev
>>>>>
>>>>
>>>>  --
>>>> Você recebeu esta mensagem porque está inscrito na lista "flexdev"
>>>> Para enviar uma mensagem, envie um e-mail para [email protected]
>>>> Para sair da lista, envie um email em branco para
>>>> [email protected]
>>>> Mais opções estão disponíveis em http://groups.google.com/group/flexdev
>>>>
>>>
>>>  --
>>> Você recebeu esta mensagem porque está inscrito na lista "flexdev"
>>> Para enviar uma mensagem, envie um e-mail para [email protected]
>>> Para sair da lista, envie um email em branco para
>>> [email protected]
>>> Mais opções estão disponíveis em http://groups.google.com/group/flexdev
>>>
>>
>>  --
>> Você recebeu esta mensagem porque está inscrito na lista "flexdev"
>> Para enviar uma mensagem, envie um e-mail para [email protected]
>> Para sair da lista, envie um email em branco para
>> [email protected]
>> Mais opções estão disponíveis em http://groups.google.com/group/flexdev
>>
>
>  --
> Você recebeu esta mensagem porque está inscrito na lista "flexdev"
> Para enviar uma mensagem, envie um e-mail para [email protected]
> Para sair da lista, envie um email em branco para
> [email protected]
> Mais opções estão disponíveis em http://groups.google.com/group/flexdev
>

-- 
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para [email protected]
Para sair da lista, envie um email em branco para 
[email protected]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev

Responder a