Good to know - my understanding of entity managers is low, so I was thinking the two lots of persistence.xml files would mean 2 entity managers, one for tapestry-jpa and one for EJB, unless tapestry-jpa can get the EJB's persistence.xml through java packaging magic.
Stuff for me to learn unless someone can give a definitive "this is how it works" Have a good weekend, Chris On 23/09/2011, at 4:14 PM, Lenny Primak wrote: > I am using JPA module from 5.3 no problems, not sure about 5.2, but I don't > think that it should be an issue > I don't see any issues of mixing JPA module with EJB3 because I use it myself > On Sep 22, 2011, at 6:12 PM, Chris Mylonas wrote: > >> Thanks Lenny >> I'm on GF 3.1.1 + tapestry 5.2.5 no JPA module, just using the jumpstart >> stuff from the EJB3 sample. >> >> >> Can I mix tapestry-jpa with EJB3 stuff without causing problems for entity >> manager? Or would the web stuff be safer to be read-only? >> >> >> >> On 22/09/2011, at 11:55 PM, Lenny Primak wrote: >> >>> Just to let you know, I am using GF 3.1.1 and tapestry 5.3 beta 5 with >>> built in JPA module and I have no such issue. >>> >>> >>> >>> On Sep 22, 2011, at 6:12 AM, Chris Mylonas <ch...@opencsta.org> wrote: >>> >>>> OMG!! - That did the trick!!!!!! >>>> >>>> The magic is in persistence.xml >>>> >>>> <property name="eclipselink.weaving" value="false"/> >>>> >>>> Thank you Geoff you champion!!!! >>>> >>>> >>>> I wonder what it will do to "performance, caching and change tracking" >>>> because according to that page, that's what weaving is for. >>>> >>>> PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND >>>> >>>> 7484 root 20 0 827m 372m 13m S 93.3 18.4 38:09.77 java >>>> >>>> 2258 mysql 15 0 140m 30m 5000 S 34.9 1.5 13:07.30 mysqld >>>> >>>> 8168 root 15 0 10436 6304 2336 S 0.3 0.3 0:09.03 ssh >>>> >>>> 8497 chrismyl 15 0 2416 1084 820 R 0.3 0.1 0:01.69 top >>>> >>>> 1 root 15 0 2160 680 584 S 0.0 0.0 0:00.60 init >>>> >>>> Load average is at 0.7, but I'm monitoring systems during off-peak time. >>>> I'll definitely have to check JBoss out against Glassfish for this type of >>>> work I think. >>>> >>>> Anyway - I'm off to play with some Grid components :D >>>> >>>> Cheers >>>> Chris >>>> >>>> >>>> On 22/09/2011, at 7:45 PM, Geoff Callender wrote: >>>> >>>>> According to the following thread _persistence_shouldRefreshFetchGroup >>>>> was removed in Sep 2009, and a workaround for now might be to partially >>>>> disable "weaving". >>>>> >>>>> http://forums.terracotta.org/forums/posts/list/2227.page >>>>> >>>>> On 22/09/2011, at 3:54 PM, Chris Mylonas wrote: >>>>> >>>>>> Hi Lenny & Tapestry Users, >>>>>> >>>>>> Yep I tried exclude in the template. No such luck. The thing errors >>>>>> out in setupRender - I might do the fetching of the List<CalledEvent> in >>>>>> onActivate (even though it's in the wrong place to put such stuff). >>>>>> >>>>>> I tried a few things, like the other suggestion to use @Inject >>>>>> BeanModelSource and also what is on the jumpstart page using >>>>>> >>>>>> myModel = beanModelSource.createDisplayModel(CalledEvent.class, >>>>>> componentResources.getMessages()).exclude("_persistence_shouldRefreshFetchGroup"); >>>>>> >>>>>> But it still didn't work. Not exactly sure where the problem is, in >>>>>> EclipseLink or somewhere in Tapestry's use of BeanModel - I'll just use >>>>>> a Loop for now whilst I'm still deving. >>>>>> >>>>>> When I find some time next week I'll create a simple >>>>>> tapestry-jpa/tapestry-hibernate to see if that will work on Glassfish >>>>>> with the Grid component. >>>>>> >>>>>> Otherwise, I might go back to testing on JBoss so I can use Grid. It'll >>>>>> be a toss up whether the gains in getting easy webservices RS/SOAP on >>>>>> glassfish is worth not having use of BeanModel stuff. >>>>>> >>>>>> This is my persistence.xml in case you can see something I'm missing to >>>>>> make it work. >>>>>> >>>>>> <?xml version="1.0" encoding="UTF-8"?> >>>>>> >>>>>> <persistence xmlns="http://java.sun.com/xml/ns/persistence" >>>>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >>>>>> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence >>>>>> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" >>>>>> version="1.0"> >>>>>> >>>>>> <persistence-unit name="CTIServerEM" transaction-type="JTA"> >>>>>> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> >>>>>> <jta-data-source>jdbc/fullcti1DS</jta-data-source> >>>>>> >>>>>> <class>org.opencsta.ctiserver.business.callservices.model.BasicEvent</class> >>>>>> >>>>>> <class>org.opencsta.ctiserver.business.callevents.model.CalledEvent</class> >>>>>> <properties> >>>>>> <!-- <property name="eclipselink.ddl-generation" >>>>>> value="drop-and-create-tables" >>>>>> /> --> >>>>>> <property name="eclipselink.ddl-generation" >>>>>> value="create-tables" /> >>>>>> <property name="eclipselink.logging.level" value="INFO" /> >>>>>> </properties> >>>>>> </persistence-unit> >>>>>> <persistence-unit name="ReadOnlyAlerteeEM" >>>>>> transaction-type="JTA"> >>>>>> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider> >>>>>> <jta-data-source>jdbc/d6alerteetestDS</jta-data-source> >>>>>> <class>com.alertee.contacts.model.CustomAlerteeContacts</class> >>>>>> <class>com.alertee.contacts.model.CustomAlerteeNumbers</class> >>>>>> <properties> >>>>>> <property name="eclipselink.ddl-generation" value="none" /> >>>>>> <property name="eclipselink.logging.level" value="INFO" /> >>>>>> <property name="eclipselink.read-only" value="true" /> >>>>>> </properties> >>>>>> </persistence-unit> >>>>>> </persistence> >>>>>> >>>>>> >>>>>> Thanks for your suggestions! >>>>>> >>>>>> Chris >>>>>> >>>>>> On 22/09/2011, at 1:24 AM, Lenny Primak wrote: >>>>>> >>>>>>> Have you tried exclude= in your template? That worked for me and is >>>>>>> simple. >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Sep 21, 2011, at 11:18 AM, Chris Mylonas <ch...@opencsta.org> wrote: >>>>>>> >>>>>>>> Hi!! >>>>>>>> >>>>>>>> It is EclipseLink (glassfish 3.1.1), I've just tried the first time >>>>>>>> now and it failed again (same reason) but I'll try a few other things >>>>>>>> based on Thiago's response earlier (re: BeanModel). >>>>>>>> >>>>>>>> Here is CalledEvent which the error comes from if you can see anything >>>>>>>> strange, apologies Thiago for sending it to you directly earlier!! >>>>>>>> >>>>>>>> package org.opencsta.ctiserver.business.callevents.model; >>>>>>>> >>>>>>>> import java.io.Serializable; >>>>>>>> >>>>>>>> import javax.persistence.Entity; >>>>>>>> import javax.persistence.GeneratedValue; >>>>>>>> import javax.persistence.GenerationType; >>>>>>>> import javax.persistence.Id; >>>>>>>> import javax.persistence.NamedQueries; >>>>>>>> import javax.persistence.NamedQuery; >>>>>>>> import javax.persistence.Transient; >>>>>>>> >>>>>>>> /** >>>>>>>> * @author chrismylonas >>>>>>>> * >>>>>>>> */ >>>>>>>> @Entity >>>>>>>> @NamedQueries({ @NamedQuery(name >>>>>>>> =org.opencsta.ctiserver.business.callevents.model.CalledEvent.QUERY_GETALL, >>>>>>>> query ="select c FROM CalledEvent c") }) >>>>>>>> public class CalledEvent implements Serializable { >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private static final long serialVersionUID =-35384297244606697L; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> public static final String QUERY_GETALL >>>>>>>> ="org.opencsta.ctiserver.business.callevents.model.CalledEvent.QUERY_GETALL"; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> @Id >>>>>>>> @GeneratedValue(strategy =GenerationType.IDENTITY) >>>>>>>> private Long id; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private String name; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private String callingParty; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private String calledParty; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private String dialedNumber; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private String trunk; >>>>>>>> >>>>>>>> /** >>>>>>>> * >>>>>>>> */ >>>>>>>> private String server; >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public Long getId() { >>>>>>>> return id; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param id >>>>>>>> */ >>>>>>>> public void setId(Long id) { >>>>>>>> this.id =id; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public String getName() { >>>>>>>> return name; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param name >>>>>>>> */ >>>>>>>> public void setName(String name) { >>>>>>>> this.name =name; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public String getCallingParty() { >>>>>>>> return callingParty; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param callingParty >>>>>>>> */ >>>>>>>> public void setCallingParty(String callingParty) { >>>>>>>> this.callingParty ĂŠllingParty; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public String getCalledParty() { >>>>>>>> return calledParty; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param calledParty >>>>>>>> */ >>>>>>>> public void setCalledParty(String calledParty) { >>>>>>>> this.calledParty ĂŠlledParty; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public String getDialedNumber() { >>>>>>>> return dialedNumber; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param dialedNumber >>>>>>>> */ >>>>>>>> public void setDialedNumber(String dialedNumber) { >>>>>>>> this.dialedNumber =dialedNumber; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public String getTrunk() { >>>>>>>> return trunk; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param trunk >>>>>>>> */ >>>>>>>> public void setTrunk(String trunk) { >>>>>>>> this.trunk =trunk; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @return >>>>>>>> */ >>>>>>>> public String getServer() { >>>>>>>> return server; >>>>>>>> } >>>>>>>> >>>>>>>> /** >>>>>>>> * @param server >>>>>>>> */ >>>>>>>> public void setServer(String server) { >>>>>>>> this.server =server; >>>>>>>> } >>>>>>>> } >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> On 22/09/2011, at 12:53 AM, Lenny Primak wrote: >>>>>>>> >>>>>>>>> This is EclipseLink. I use it and ran into the same problem. >>>>>>>>> >>>>>>>>> On Sep 21, 2011, at 10:28 AM, Lenny Primak wrote: >>>>>>>>> >>>>>>>>>> If you add exclude="_persistence_shouldRefreshFetchGroup" >>>>>>>>>> to your grid definition, this should resolve the problem. >>>>>>>>>> >>>>>>>>>> On Sep 21, 2011, at 3:10 AM, Chris Mylonas wrote: >>>>>>>>>> >>>>>>>>>>> Hello Tapestry Users, >>>>>>>>>>> >>>>>>>>>>> I've got a problem with the grid element. >>>>>>>>>>> >>>>>>>>>>> <t:grid source="calledEvents" value="calledEvent" /> >>>>>>>>>>> >>>>>>>>>>> It doesn't happen if I put my List<CalledEvent> into a Loop element >>>>>>>>>>> and build the table. >>>>>>>>>>> >>>>>>>>>>> <t:loop source="calledEvents" value="calledEvent"> >>>>>>>>>>> <tr> >>>>>>>>>>> <td>${calledEvent.id}</td> >>>>>>>>>>> <td>${calledEvent.calledParty}</td> >>>>>>>>>>> <td>${calledEvent.callingParty}</td> >>>>>>>>>>> <td>${calledEvent.dialedNumber}</td> >>>>>>>>>>> </tr> >>>>>>>>>>> </t:loop> >>>>>>>>>>> >>>>>>>>>>> I'm getting this error when using the grid >>>>>>>>>>> >>>>>>>>>>> Render queue error in SetupRender[Index:grid.columns]: Failure >>>>>>>>>>> reading parameter 'model' of component Index:grid: Exception >>>>>>>>>>> generating conduit for expression >>>>>>>>>>> '_persistence_shouldRefreshFetchGroup': Unable to add method >>>>>>>>>>> java.lang.Object get(java.lang.Object) to class >>>>>>>>>>> $PropertyConduit_1328ac84ee8: [source error] >>>>>>>>>>> _persistence_shouldRefreshFetchGroup() not found in >>>>>>>>>>> org.opencsta.ctiserver.business.callevents.model.CalledEvent >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> What does this mean? >>>>>>>>>>> >>>>>>>>>>> I'm using Geoff's @EJB stuff from jumpstart's EJBAnnotationWorker >>>>>>>>>>> example >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> I'd really like to use the grid because then I can use the >>>>>>>>>>> rowsPerPage parameter for "developer productivity" :P >>>>>>>>>>> >>>>>>>>>>> Thanks for any help, >>>>>>>>>>> Chris >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> --------------------------------------------------------------------- >>>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> --------------------------------------------------------------------- >>>>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>>>>> >>>>>>>> >>>>>>> >>>>>>> --------------------------------------------------------------------- >>>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>>>> >>>>>> >>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>>>> For additional commands, e-mail: users-h...@tapestry.apache.org >>>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org