-
February 13th, 2008, 09:27 AM
#1
Hello,
the AdapterConfig property of the MetadataProviderServer (in your example Server.AdapterConfig) is used to pass a configuration file to the init of the MetadataProviderAdapter instance but no operations are performed on that file.
The AdapterConfig is expected to be a file path (but it could be any string) and it is passed as is to the MetadataProviderAdapter.
So the MetadataProviderAdapter will receive a string containing the path passed as AdapterConfig. This means that the file should be parsed by custom code.
An idea could be to parse the file early (eg in the StandaloneLauncher.cs) and pass it to the MetadataProviderServer instance (Server) as a list of properties in the AdapterParams property.
Obviously this means that you can use any kind of file as the reading of it is up to your code.
HTH.
-
July 6th, 2010, 12:43 PM
#2
How to read config file
Hi Mone,
We are using ibatis to persist data in database before pushing it to lightstreaner,
but when i deploy adapter, i am getting following error, I think lightstreamer is not reading any config xmls, Please suggest how to go for this.
Exception in thread "Thread-13" java.lang.NoClassDefFoundError: org/apache/ibatis/io/Resources
at com.marketnews.mni.common.db.MyBatisInitializer.<c linit>(Unknown Source)
at com.marketnews.mni.common.db.NewsItemDao.createNew sItem(Unknown Source)
Even i tried to read Properties from .properties file, lightstreamer did not recognise the .properties file eventhogh the file was mentioned in classpath.
-
July 7th, 2010, 10:28 AM
#3
As you are writing on the .NET Adapter API forum,
it is unclear whether your are working with normal in-process java Adapters or with Remote Adapters.
Assuming that you are using java adapters and that they access external libraries through some jar files,
I confirm that any jar that is put in the adapter's lib folder or in the shared/lib folder is added to the classpath available to Adapter code;
similarly, any class or other resource file that is put in the adapter's classes folder or in the shared/classes folder is available to Adapter code.
You can ensure that the classes and resources that you placed in these folders are available by trying to load them (just for testing purpose) from inside your Adapter init method.
If they still can't be seen by your external library, then try adding them to the global classpath, by modifying the JVM command line in the launch script (namely, LS.bat or LS.sh).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
All times are GMT +1. The time now is 10:20 PM.
Bookmarks