« Return to Thread: webapp spring roots

Re: webapp spring roots

by Fernando Padilla :: Rate this Message:

Reply to Author | View in Thread

actually.  multiple context roots sharing the same dso root is a
requirement for production as well!!

we have many different web applications all sharing different databases,
which we want to use terracotta to implement the shared database cache.

this is a no go for terracotta :( :( :( :(

please help :) :) :)


Fernando Padilla wrote:

> This is disappointing.  So I might be a little miffed, since I was so
> close to properly test and roll out terracotta, but there seem to be
> hacks and obstacles on every step.
>
>
> So what is the point of having the "same logical classloader", when I
> already told you that they are the "same logical root"?
>
> So do you guys have any plans on fixing this? eta?
>
> The whole selling point of terracotta is supposed to be the mythical
> "zero modification", having to hack up my classloader configurations on
> each server doesn't match up with that..
>
> and by the way, I want you to support the option where different
> "context roots" can still map to the same root object please!  Each of
> our developers usually have different context roots, but they might
> share the same database ( thus the same database cache ).
>
>
>
> Tim Eck wrote:
>> I apologize I haven't been following every message in this conversation,
>> but this looks like a known limitation in terracotta. Every object that is
>> clustered carries information that describes which class loader created
>> (such that we can locate the same logical loader on other nodes). This
>> makes for issue fore sharing between different app servers (or an app
>> server and a standalone vanilla java process for that matter).
>>
>> There a few workarounds, but nothing too pretty really. One is to use a
>> class loader that is guaranteed to be available on both VMs (ie.
>> CLASSPATH).
>>
>> One thing we've thought about doing (but is yet to be implemented) is to
>> name web application class loaders in the same manner no matter which app
>> server is being used. This would probably enable your use case to work
>> (assuming you're using the same context paths on both jetty and tomcat)
>>
>>> -----Original Message-----
>>> From: tc-users-bounces@... [mailto:tc-users-
>>> bounces@...] On Behalf Of Fernando Padilla
>>> Sent: Tuesday, February 26, 2008 2:10 PM
>>> To: tc-users@...
>>> Subject: Re: [tc-users] webapp spring roots
>>>
>>> I did as you suggested.  I loaded the app under tomcat, and it works as
>>> usual.  Then I shutdown tomcat and ran it under jetty and got this
>>> exception:
>>>
>>> 7233 [main] INFO com.tcspring.DistributableBeanFactoryMixin - ptAppsRoot
>>> registering transient fields for tc-cache-map-factory
>>> com.protrade.common.cache.CacheFactory
>>> com.tc.exception.TCClassNotFoundException:
>>> java.lang.ClassNotFoundException: No registered loader for description:
>>> Tomcat.Catalina:localhost:/fbracket, trying to load
>>> com.tcspring.ComplexBeanId
>>>          at
>>>
>> com.tc.object.ClientObjectManagerImpl.lookupOrCreateRoot(ClientObjectManag
>>> erImpl.java:600)
>>>          at
>>>
>> com.tc.object.bytecode.ManagerImpl.lookupOrCreateRoot(ManagerImpl.java:287
>>> )
>>>          at
>>>
>> com.tc.object.bytecode.ManagerImpl.lookupOrCreateRoot(ManagerImpl.java:266
>>> )
>>>          at
>>>
>> com.tc.object.bytecode.ManagerUtil.lookupOrCreateRoot(ManagerUtil.java:130
>>> )
>>>          at
>>>
>> com.tcspring.DistributableBeanFactoryMixin$ManagerUtilWrapperImpl.lookupOr
>>> CreateRoot(DistributableBeanFactoryMixin.java:419)
>>>          at
>>>
>> com.tcspring.DistributableBeanFactoryMixin.registerBeanDefinitions(Distrib
>>> utableBeanFactoryMixin.java:221)
>>>          at
>>>
>> org.springframework.beans.factory.support.AbstractBeanFactory.registerBean
>>> Definitions(AbstractBeanFactory.java)
>>> ....
>>> ...
>>>
>>>
>>>
>>>
>>> Eugene Kuleshov wrote:
>>>> Hi Fernando,
>>>>
>>>>   By default Terracotta for Spring is naming those roots using
>> synthetic
>>>> name derived from the matching web application name and matching
>> spring
>>>> config names. There is a FAQ entry about that in the "Troubleshooting
>>>> Guide" linked from the on Terracotta home page. See
>>>>
>> https://terracotta.org/confluence/display/wiki/Troubleshooting+Guide#Troub
>>> leshootingGuide-TerracottaforSpring...
>>>>   So you can override that root name in your tc-config.xml using
>>>> <root-name> element:
>>>>
>>>> ...
>>>> <application>
>>>>    <spring>
>>>>      <jee-application>
>>>>        <application-contexts>
>>>>          <application-context>
>>>>            <root-name>myClusteredSpringContext</root-name>
>>>>              ...
>>>>
>>>>   regards,
>>>>   Eugene Kuleshov
>>>>
>>>> PS: it feels like I am the only one answering all the questions today,
>>>> but by strange coincidence those happens to be from my area of
>> expertise
>>>> Fernando Padilla wrote:
>>>>> I want to run my webapp through tomcat, jetty and mvn jetty:run, but
>>>>> when I did, I noticed that terracotta was generating unique roots for
>>>>> different ways that I launch the web application; and for each
>>> different
>>>>> context path that I launch my webapp under.. ( so developers can't
>>> share
>>>>> roots )
>>>>>
>>>>> This is very disappointing.  How can I get this working?
>>>>>
>>>>> -------
>>>>> tc:spring_info.appName is coming up with different things:
>>>>>
>>>>> fbracket
>>>>> Jetty.path=/fbracket
>>>>> Jetty.path=/fannetwork
>>>>>
>>>>
>>>> _______________________________________________
>>>> tc-users mailing list
>>>> tc-users@...
>>>> http://lists.terracotta.org/mailman/listinfo/tc-users
>>> _______________________________________________
>>> tc-users mailing list
>>> tc-users@...
>>> http://lists.terracotta.org/mailman/listinfo/tc-users
>> _______________________________________________
>> tc-users mailing list
>> tc-users@...
>> http://lists.terracotta.org/mailman/listinfo/tc-users
> _______________________________________________
> tc-users mailing list
> tc-users@...
> http://lists.terracotta.org/mailman/listinfo/tc-users
_______________________________________________
tc-users mailing list
tc-users@...
http://lists.terracotta.org/mailman/listinfo/tc-users

 « Return to Thread: webapp spring roots

LightInTheBox - Buy quality products at wholesale price!