- 浏览: 28943 次
最新评论
-
javaeye289:
能用语言来说明一下吗?我是初学者,这样的解释我可太难理解了~~ ...
线程内存模型学习 -
tom.duan:
我没有用SpringModule里面的解决方案,更简单一些,在 ...
Spring Module---cache -
commanderhyk:
ok贴出来大家研究一下.
Spring Module---cache -
tom.duan:
getXXXList的意思是?
前三个字母是get,后四个字母 ...
Spring Module---cache -
MiMiEye:
收藏一下,有空的时候研究一下下...
Spring Module---cache
比如区域,会有下级地市等等,对于dbunit来说他貌似只能对表与表之间的关联关系进行处理,对于同一表中记录与记录之间的关系,他处理不了,会出现外键约束违例。由于对dbunit目前了解的比较肤浅,还请大家能不吝赐教。
评论
1 楼
long110
2007-05-17
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
package com.javaeye.jms.jboss;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueSender;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
public class JbossNativeJmsImpl {
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp sender will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 apito get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> start the Producer[jms1.1 spec] by a session
* 6> get messege Object or initial it yourself by implements the messegeor
* it's sub interfaces
* 7> call sender or send it selfing
* 8> finallized the connection object or it will throw a warning to you!
*
* @param messege
* @throws NamingException
* @throws JMSException
*/
public void sendingProcessing(String messege) throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageProducer msgp = session.createProducer(dest);
QueueSender sender = (QueueSender) msgp;
TextMessage msg = session.createTextMessage();
msg.setText(messege);
sender.send(msg);
conn.close();
}
/**
* @author zuly
*
* following jms ptp domain, use an simple text message to test
*
* A jms ptp retriver will following the steps below!
* 1> get an ConnectionFactory use JNDI Lookup Or Initial it yourself
* 2> use this ConnectionFactory to start a jms connection
* [spec to jms 1.1 api to get the main idea of it ]
* 3> use connection to create a jms session
* 4> get a queue destination / messege agent
* 5> retrive a consumer from session
* 6> start the jms connection to retrivte the message
* 7> get message from consumer
*
* @return textMessege
* @throws NamingException
* @throws JMSException
*/
public String retriveingProcessing() throws NamingException, JMSException{
Context ctx = new InitialContext();
ConnectionFactory cf = (ConnectionFactory) ctx.lookup("java:JmsXA");
Connection conn = cf.createConnection();
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination dest = (Queue) ctx.lookup("queue/A");
MessageConsumer msgconsumer = session.createConsumer(dest);
//MessageListener ml = new JmsListenner();
//msgconsumer.setMessageListener(ml);
conn.start();
TextMessage msg = (TextMessage) msgconsumer.receive();
conn.close();
System.out.println("messege is" + msg.getText());
return msg.getText();
}
}
相关推荐
使用DbUnit测试数据库.pdf
1。利用MySql数据库建立一个测试的数据库student: 2.建立新的java工程,例如DBUnitSample, 将DbUnit jar文件和MySql数据库驱动文件导入到工程中: 3.编写连接MySql数据库的类以及用于测试的类
java连接数据库最好的选择,可以用于,flash能过控制java来运用数据库
用于数据库测试的一个工具,具有很强的灵活性。也是自己在网上找的,分享一下
DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类DBUNIT 基类...
DBUNIT使用的详细文档
dbunit2.2完全包 数据库单元测试
dbunit使用必需Jar包,总共4个必需Jar包
文档是关于DBUnit的ant的使用文档,通俗易懂
有了DBUnit,一切都变了,DBUnit的目的就是在每个单元测试运行之前将数据库初始化成一个预定义的状态,以保证单元测试时的断言不会因为数据库状态发生了变化而失败,同时可以解决前一个单元测试失败导致对数据库的...
Dbunit 基本原理就是在跑测试用例运行之前对数据表做用户定义的操作,清空不想要的数据,插入用户自定义的数据,使得该数据表处于用户知道的一种状态。而用户自定义的数据使用项目里的一个 xml 文件来表示。 Xml ...
介绍dbunit的使用和原理,核心组件介绍
介绍了DBUNIT最新版的使用方法。并给出了一个详细的例子
最新的最全的dbunit jar包以及入门教程
dbunit-2.4.9 源码 http://www.dbunit.org/apidocs/index.html 代码 API
用dbunit的两个例子,很不错,有帮助
3.2. DBunit使用最佳实践 9 3.2.1. 每一个开发人员需要搞一个数据库实例。 9 3.2.2. 使用XML文件作为DataSet 9 3.2.3. DBUnit的最佳实践是尽可能使用最小的数据集。 10 3.2.4. DatabaseOperation.CLEAN_INSERT 策略 ...
DbUnit(http://dbunit.sourceforge.net/)则是专 门针对数据库测试的对JUnit的一个扩展, 它可以将测试对象数据库置于一个测试轮回之间的状态。 这个是主要jar包
NULL 博文链接:https://kanglecjr.iteye.com/blog/2158320
一个很好的DBUnit的例子 博文链接:https://virgoooos.iteye.com/blog/186859