I'm a little unsure what you're doing here, but you can definitely load a cache before your ESB archive starts up.
My requirnment is to use/load some commonly used java constants which will be used by other ESB projects.
So i thought of including some commonly used java classes inside the cache. And i am not aware how to do it using JBOSS ESB.
If you can provide me some example on this that will really help me.
JBoss also has a properties service where you can set system properties and make them available to both ESB deployments (jboss-esb.xml) and off course in your code. But, it depends a bit on what you want to do. The properties service is an option if you want more platform like options across your ESB projects...
Are you talking about commonly used Java code constants, or configuration constants/parameters?
If you're just talking about common utility code that you do not want to have to bundle in all your ESB apps, then you could probably bundle that code and drop it into the AS lib dir. If you are talking about shared application/config data that you want visible to all apps before startup, then I think this really depends on your requirements... how is this data stored/read etc?
I am talking about commonly used Java code constants so that i can uses these constants in my ESB projects, constants = name-value pair..
I dont want to include these constants as a part of ESB project. This Java Code utility or any property files must be loaded before any other ESB project loads.
How can i achieve this.
So it's just common java utility code then it seems i.e. compiled and bundled/jar'd java classes. The fact that it's code defining constants etc is irrelevant.
You should be able to just drop the jar in e.g. the server/default/lib folder.