Posted: Mon Sep 29, 2008 10:36 am Post subject: spring-hibernet-config.xml file access problem in javacomput
Newbie
Joined: 29 Sep 2008 Posts: 3
There is an application group who has developed connector facade classes to make connection to ORACLE 10g database and start transaction to write records read from a file. Here is the simple flow...
File input node reads file and records.
Java compute node initializes facade by instanciate if it's a first pass of record. Then calls submit method in the facade. Facade stored the record object in an array. When the file end is detected the java code in this node calls complete method in the facade. The complete method calls methods in spring jar to start the transaction. This class needs spring-hibernet-config.xml file to read the connection information. The method in spring class reports this file not found. The file is present in the application jar file where facade class is also bundled. So the java compute node finds this facade class but the spring class can't find the spring-hibernet-config.xml file.
There is a test program wiritten by the application group which uses the same application jar file and is able to start the transaction with a stand alone java program.
We tried the following and still the problem persists:
- we tried with CLASSPATH, the applicaiton jar file is CLASSPATH
- we tried putting the application jar file in the beginning of the CLASSPATH,
- we tried putting the jar file in shared classes directory of wmb
- we tried just putting that xml file in shared classes directory of wmb
- we tried putting this xml file with the BAR file
- Is this a WMB issue or SPRING configuration issue.
- Is there any discussion thread on this using SPRING with WMB
- Is there any way we can get more trace details on WMB's VM when application JAR file is loaded in the WMB's container to ensure that it's not throwing any exception on this xml file because of format problem.
You should not be attempting to run J2EE/JEE code in a JavaCompute node.
It is like trying to build and deploy an HTTP Server inside of a Java Servlet.
If you really have a pathological desire to ignore the robust and transactional database connectivity in Message Broker, then you should be exposing these "connector facade classes" as Web Services, and invoking them using a SOAPRequest node from Message Broker.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum