Occasionally, I'll have a data object that stores a reference to service. Here's an example:
public class ActiveUser extends BaseOptimizedSessionPersistedObject { private long userId; private final Session session; public ActiveUser(Session session) { this.session = session; } public long getUserId() { return userId; } public void setUserId(long userId) { markDirty(); this.userId = userId; } public User getUser() { return userId == 0 ? null : (User) session.get(User.class, userId); } @Override public String toString() { return String.format("ActiveUser[userId=%d, session=%s]", userId, session); } } This is an ApplicationStateObject, so it persists in the HttpSession, but it uses the Hibernate Session as well. On Fri, Jan 30, 2009 at 8:33 AM, Dude.Checkitout <dude.checkit...@gmail.com> wrote: > > Thanks Howard. > > We have few Tapestry applications running in the same server. (and planning > to have more) > I am assuming it is going to cause issues based on your reply. What is the > best way to avoid this issue? > > Just curious, at what point does a service(/proxy) gets > serialized/de-serialized? I am getting this error only when I have more then > one tapestry application and when the second webapp gets loaded... > > > Howard Lewis Ship wrote: >> >> If you have only one Tapestry application, you can safely ignore this >> warning. >> >> It's related to the code that allows services to be serialized (that >> is, the service proxies are serializable even though the services >> themselves are not). When a service is de-serialized, there's a static >> variable used to identify the active Registry to connect to. It's >> ugly, but the Servlet API does not address this issue and so we are >> left with this kludge. >> >> If you have only one Tapestry application deployed in your server, or >> you never serialize a service proxy (the latter being a rather rare >> occurance) then you can ignore the warnings. >> >> On Fri, Jan 30, 2009 at 7:40 AM, Dude.Checkitout >> <dude.checkit...@gmail.com> wrote: >>> >>> Getting the following error when refreshing/redeploying the web >>> application >>> in JBoss. "[org.apache.tapestry5.ioc.internal.SerializationSupport] >>> Setting >>> a new service proxy provider when there's already an existing provider. >>> This >>> may indicate that you have multiple IoC Registries." >>> >>> For maintenance reasons, all the tapestry jar files are kept out of >>> WEB-INF/lib folder and kept in JBoss loadable folders. Each time the web >>> app >>> reloads, above error is written into the log file. But the webapp is >>> loaded >>> and "looks" fine. >>> >>> We are observing some strange behavior about the service configurations >>> and >>> wondering whether this error could be the cause of those? >>> Can anyone help understand this error? What part of tapestry is affected >>> by >>> this error? >>> >>> http://tapestry.apache.org/tapestry5/tapestry-ioc/serialization.html >>> http://tapestry.apache.org/tapestry5/tapestry-ioc/serialization.html - >>> talks about this error but does not say how to solve it or the effect of >>> this error on the Tapestry behavior >>> -- >>> View this message in context: >>> http://n2.nabble.com/multiple-IoC-Registries-tp2245422p2245422.html >>> Sent from the Tapestry Users mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >> >> >> >> -- >> Howard M. Lewis Ship >> >> Creator Apache Tapestry and Apache HiveMind >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> >> > > -- > View this message in context: > http://n2.nabble.com/multiple-IoC-Registries-tp2245422p2245712.html > Sent from the Tapestry Users mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Howard M. Lewis Ship Creator Apache Tapestry and Apache HiveMind --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org