[jboss-user] [JBossWS] - Re: Writing a client - no examples for BindingProvider based

mjhammel do-not-reply at jboss.com
Mon Jan 14 10:30:18 EST 2008


"alessio.soldano at jboss.com" wrote : This is not your situation, you're not using the persistence context in a servlet, you need injection in a SLSB. And my previous post shows that it works.

That may be, but then there is this discussion:

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=107353

In any case, I've done everything I think I need to do and it still doesn't work.  I'd be happy for someone to show me what I've done wrong, but barring that I'd still have to say, in my case, it doesn't work.

anonymous wrote : I've just tried this too. It works more or less. I'm saying so since of course the problems you might have to face are lazy instantiation and cyclic referenced structure (that cannot be serialized into xml without references).
  | 

The "lazy" exception was due to Hibernate creating OneToMany annotations for fields in one table that were referenced by other tables.  These references could not be serialized and caused the exceptions.  

The references were created by Hibernate during the reverse engineering process because I had specified a foreign-key in other tables that pointed back to the first table.  I removed the foreign-keys from my MySQL DB schema and the problem went away.  The only drawback I can find on my end is that I need to add code to verify I don't have abandoned rows with links to rows that don't actually exist in other tables.  Being a C programmer originally, I'm used to writing all my own checks like this, so it's not that big a deal.  At least now I can pass back the serialized objects that represent db rows.

FWIW, I'm now passed this issue and trying to get access to the DB from a Schedulable.  Like my Web Services class, injection does not seem to work there either.  Unlike my Web Services class, I can't seem to find a work around in the schedulable because I don't know how to create a transaction and the method for retrieving the UserTransaction I used in the WS class doesn't work in a schedulable.  See 

http://www.jboss.com/index.html?module=bb&op=viewtopic&t=127493



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4119683#4119683

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4119683



More information about the jboss-user mailing list