I have a custom chat adapter that uses hibernate to log all chat messages to the db. I use a hibernate.cfg.xml file that binds the hibernate SessionFactory to jndi (in jboss). On initialization of the chat adapter, it grabs the sessionfactory from the jndi and opens a new session. Took me a while to get this going but it works. Here's the crazy thing I don't get:
If I rename the service id of my data-management-config.xml from data-service to anything else (i.e. data-service1), the hibernate configuration loads BEFORE my chat adapter initializes. If I leave it as the default, the chat adapter loads first and then fails because the sessionfactory isn't bound to jndi yet. I just don't get why the ID of the data service can affect the sequence of events. Anyone? Vic