[Logo] Terracotta Discussion Forums
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Application context path issue  XML
Forum Index -> Terracotta for Spring
Author Message
jonaddy

neo

Joined: 10/18/2007 08:42:49
Messages: 8
Offline

My terracotta server is not finding my spring config file (applicationContext.xml) when i specify the path relative to the working directory.

With the following value in tc-config.xml


<paths>
<path>config/applicationContext.xml</path>
</paths>
 


the beans i specified within the config file were not clustered. I moved applicationContext.xml up a level out of the config directory i.e. into my working directory and altered tc-config.xml to


<paths>
<path>applicationContext.xml</path>
</paths>
 


The beans are now clustered. Is this a bug or have I got my path specification wrong?

I'm using terracotta 2.4.4 and using dso-java.bat and start-tc-server.bat to start the clients and server respectively.

Thanks,
Jon
gkeim

ophanim

Joined: 12/05/2006 10:22:37
Messages: 685
Location: Terracotta, Inc.
Offline

I believe this path is compared against the paths of the resources used to load your bean definitions. I assume you're using a FileSystemXmlApplicationContext, so that would be FileSystemResource.

You can enable location information in your config and the bean def resource locations will be logged:

<paths><path>config/applicationContext.xml</path></paths>
<enable-location-info>true</enable-location-info>

I notice that this enable-location-info element is not described in the tc-config-reference.xml, so I'll add that.

Gary Keim (terracotta developer) Want to post to this forum? Join the Terracotta Community
jonaddy

neo

Joined: 10/18/2007 08:42:49
Messages: 8
Offline

Thankyou, that would explain things.

I'm using the ClassPathXmlApplicationContext and have "config" on the classpath so putting "config" into the <PATH> element would throw terracotta completely of the scent.

Thanks,
Jon
ekulesho

master

Joined: 12/04/2006 08:49:08
Messages: 57
Offline

Please don't use <enable-location-info>true</enable-location-info>, unless you are absolutely have to.

regards,
Eugene Kuleshov
[WWW]
 
Forum Index -> Terracotta for Spring
Go to:   
Powered by JForum 2.1.7 © JForum Team