we are using JPOS1.3.8 in our project and we wrote server program by
implementing ISORequestListener. problem is that now we are upgrading
to JPOS1.4.8 and i dont know how to write server program which runs in
Q2 and writing configuration file, any suggestions would be highly
appreciated.
<server class="org.jpos.q2.iso.QServer" logger="Q2" name="server">
<attr name="port" type="java.lang.Integer">10000</attr>
<channel class="org.jpos.iso.channel.XMLChannel"
logger="Q2" packager="org.jpos.iso.packager.XMLPackager">
</channel>
<request-listener class="your.iso.request.Listener" logger="Q2">
...
... place your requestlistener configuration here
...
</request-listener>
</server>
<log realm="Q2.system" at="Fri Sep 22 07:20:03 BST 2006.448">
<warn>
deploy
<exception name="null nested exception is
java.lang.ClassNotFoundException: org.jpos.q2.iso.QServer">
javax.management.ReflectionException: null nested exception is
java.lang.ClassNotFoundException: org.jpos.
q2.iso.QServer
java.lang.ClassNotFoundException: org.jpos.q2.iso.QServer
at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
at
mx4j.server.interceptor.InvokerMBeanServerInterceptor.instantiate(InvokerMBeanServerInterceptor.jav
a:100)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.instantiate(DefaultMBeanServerInterceptor.jav
a:106)
at
mx4j.server.interceptor.SecurityMBeanServerInterceptor.instantiate(SecurityMBeanServerInterceptor.j
ava:74)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.instantiate(DefaultMBeanServerInterceptor.jav
a:106)
at
mx4j.server.interceptor.DefaultMBeanServerInterceptor.instantiate(DefaultMBeanServerInterceptor.jav
a:106)
at
mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.instantiate(ContextClassLoaderMBea
nServerInterceptor.java:138)
at
mx4j.server.MX4JMBeanServer.instantiateImpl(MX4JMBeanServer.java:677)
at mx4j.server.MX4JMBeanServer.instantiate(MX4JMBeanServer.java:664)
at mx4j.server.MX4JMBeanServer.instantiate(MX4JMBeanServer.java:644)
at org.jpos.q2.QFactory.instantiate(QFactory.java:107)
at org.jpos.q2.Q2.deploy(Q2.java:348)
at org.jpos.q2.Q2.deploy(Q2.java:212)
below is the server program i'm using
public class TestISOServer implements ISORequestListener {
public TestISOServer() {
super();
}
public boolean process (ISOSource source, ISOMsg m) {
try {
m.setResponseMTI ();
m.set (39, "00");
source.send (m);
} catch (ISOException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
return true;
}
public static void main (String[] args) throws Exception {
Logger logger = new Logger ();
logger.addListener (new SimpleLogListener (System.out));
ServerChannel channel = new XMLChannel (new XMLPackager());
((LogSource)channel).setLogger (logger, "channel");
ISOServer server = new ISOServer (8050, channel, null);
server.setLogger (logger, "server");
server.addISORequestListener (new TestISOServer());
new Thread (server).start ();
}
}
--
View this message in context: http://www.nabble.com/writing-ISOServer-for-Q2-in-JPOS1.4.8-tf2310258.html#a6441657
Sent from the jPOS - Users mailing list archive at Nabble.com.