I have a problem with a @transactional(readOnly=false) method, into a @Service class exposed to flex with @RemotingDestination
this class has two methods.
- One read from a dataSource through a @Repository dao class.
- And Other who writes to the database through the same dao.
The reading of the entities from flex client is ok. But the problem is when i need to persist. At the moment of flush the method stop, fail in flex and don't show any exception in java stacktrace. (the db don't save anything too)
i have in the service, code likes this:
in the DAO, for testing purpose is there a flush after persist.Code:@Service("fooService") @RemotingDestination public class FooService() { @Autowired private GenericDao genericDao; @Transactional(readOnly=false) @RemoteInclude public void methodWhoPersist(Dog entity) { ... try{ genericDao.save(entity); }catch(Exception ex) { ex.printstacktrace(); throw new RuntimeException("error in save method"); } ... } }
Another thing is when call the service from other spring bean, the method who write works ok. This not work only with the flex call.Code:... em.persist(entity); em.flush(); ...
I'm using JPA/HIBERNATE 3, SPRING 3.0.5
Sorry for my English, is not my native language.
heeelp![]()


Reply With Quote
