Can we just remove this "magainty"/"Martin Gainty" from Struts mailing lists? I do not understand what it/he writes.
Musachy Barroso wrote: > > never mind him, he is a troll, or a bot, or very very stupid, or all of > them. > > On Sat, Nov 14, 2009 at 9:18 PM, Denis Cabasson > <denis.cabas...@gmail.com> wrote: >> Hi Martin, >> >> I am building a Struts 2 / Spring / Hibernate application, using the JPA >> specification as it seems to be the case here. It is not required to go >> through all the pain of using EJB entities. I am running this application >> both in Websphere and Tomcat, without using the container at all. To me >> the >> problem is only a JPA / Hibernate problem, and Spring is totally able to >> handle that without having to rely on the container. >> >> Denis. >> >> Martin Gainty a écrit : >>> >>> good morning denis >>> >>> i sent chris a summary of working hibernate examples in Glassfish >>> the getReference is a method from Ejb3Configuration >>> the merge method comes from org.hibernate.ejb.AbstractEntityManagerImpl >>> (and implements the sessions merge) >>> whichever app server he will be implementing will have to be configured >>> to >>> serve his specific Bean as an EJBEntity.. >>> Glassfish Users list would be more helpful >>> >>> i hope this clarifies Martin Gainty >>> ______________________________________________ Verzicht und >>> Vertraulichkeitanmerkung/Note de déni et de confidentialité >>> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene >>> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede >>> unbefugte >>> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese >>> Nachricht >>> dient lediglich dem Austausch von Informationen und entfaltet keine >>> rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von >>> E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. >>> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas >>> le >>> destinataire prévu, nous te demandons avec bonté que pour satisfaire >>> informez l'expéditeur. N'importe quelle diffusion non autorisée ou la >>> copie >>> de ceci est interdite. Ce message sert à l'information seulement et >>> n'aura >>> pas n'importe quel effet légalement obligatoire. Étant donné que les >>> email >>> peuvent facilement être sujets à la manipulation, nous ne pouvons >>> accepter >>> aucune responsabilité pour le contenu fourni. >>> >>> >>> >>> >>> >>>> >>>> Date: Sat, 14 Nov 2009 08:45:46 -0500 >>>> From: denis.cabas...@gmail.com >>>> To: user@struts.apache.org >>>> Subject: Re: Hibernate/Spring >>>> >>>> From what you are saying, I would have a look at the : >>>> >>>> http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html >>>> >>>> My best guess is that this would fix your issue. If not, you probably >>>> have an issue with the way you are dealing with your entities. >>>> >>>> Denis. >>>> >>>> >>>> Chris Cranford a écrit : >>>> >>>>> >>>>> I have done a fair amount of reading today on the topic again and >>>>> developed a few simple classes to support my service, model, and dao >>>>> architecture for using Hibernate 3.3.2 and Spring 2 with Struts2. The >>>>> problem I am currently facing is I get a detached error when deleting >>>>> an object and I get a null pointer exception in SessionImpl.java when >>>>> I try to locate an object by its id. >>>>> >>>>> /* GenericDAO.java */ >>>>> >>>>> public T findById(Object id) { >>>>> return(getEntityManager().find(clazz, id)); >>>>> } >>>>> >>>>> public void delete(T entity) { >>>>> getEntityManager().remove(entity); >>>>> } >>>>> >>>>> Some posts I have seen say for the delete, you should use >>>>> getReference() or merge() in order to get an association to the entity >>>>> before you call the remove() method. I attempted to use the same type >>>>> of logic with getReference() during the findById() and it failed. >>>>> >>>>> Am I missing something in my configuration with Hibernate/Spring with >>>>> respect to the session factory or something that I need to revisit? >>>>> It really seems as though I may have a missing component or a poor >>>>> configuration somewhere. >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>>>> For additional commands, e-mail: user-h...@struts.apache.org >>>>> >>>>> >>>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>>> For additional commands, e-mail: user-h...@struts.apache.org >>>> >>>> >>> >>> >>> _________________________________________________________________ >>> Windows 7: I wanted simpler, now it's simpler. I'm a rock star. >>> >>> http://www.microsoft.com/Windows/windows-7/default.aspx?h=myidea?ocid=PID24727::T:WLMTAGL:ON:WL:en-US:WWL_WIN_myidea:112009 >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://old.nabble.com/Hibernate-Spring-tp26346725p26361575.html Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org