应用给表创建了以上我选择的表了,说明利用mysql还是可以的。
但是后台有以下输出。
<2009-7-19 上午12时15分10秒 CST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: WatchProcessMDB is unable to conn
ect to the JMS destination: weblogic.examples.ejb30.ExampleQueue. The Error was:
weblogic.jms.common.JMSException: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.jms.backend.JMSServer-
0'. Resolved 'weblogic.jms.backend'; remaining name 'JMSServer-0'
Nested exception: weblogic.jms.common.JMSException: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.jms.
backend.JMSServer-0'. Resolved 'weblogic.jms.backend'; remaining name 'JMSServer-0'
Nested exception: weblogic.jms.common.JMSException: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.jms.
backend.JMSServer-0'. Resolved 'weblogic.jms.backend'; remaining name 'JMSServer-0'
Nested exception: javax.naming.NameNotFoundException: Unable to resolve 'weblogic.jms.backend.JMSServer-0'. Resolved 'we
blogic.jms.backend'; remaining name 'JMSServer-0'>
119047 reviewService INFO [[STANDBY] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.
jdbc.JDBC - Shutting down connection pool.
<2009-7-19 上午12时15分33秒 CST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redir
ect url is /console/console.portal?_nfpb=true&_pageLabel=AppDeploymentsControlPage.>
<2009-7-19 上午12时15分47秒 CST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redir
ect url is /console/console.portal?_nfpb=true&_pageLabel=AppDeploymentsControlPage.>
<2009-7-19 上午12时26分30秒 CST> <Warning> <EJB> <BEA-010061> <The Message-Driven EJB: WatchProcessMDB is unable to conn
ect to the JMS destination: weblogic.examples.ejb30.ExampleQueue. The Error was:
Can not get distribute destination information. The destination JNDI name is weblogic.examples.ejb30.ExampleQueue, the p
rovider URL is null>
0 reviewService INFO [[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.Runti
me - Starting BEA Kodo 4.2.0load03
0 reviewService INFO [[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'] openjpa.jdbc.
JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary".
<2009-7-19 上午12时26分31秒 CST> <Warning> <netuix> <BEA-423420> <Redirect is executed in begin or refresh action. Redir
ect url is /console/console.portal?_nfpb=true&_pageLabel=AppApplicationOverviewPage&AppApplicationOverviewPortlethandle=
com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3DreviewService%2CType%3DAppDeployment%22%29.>
<2009-7-19 上午12时27分30秒 CST> <Warning> <JMSPool> <BEA-169808> <There was an error while making the initial connectio
n to the JMS resource named weblogic.examples.ejb30.QueueConnectionFactory from the EJB "ReviewListenerBean" inside appl
ication "reviewService". The server will attempt the connection again later. The error was javax.jms.JMSException: [JMSP
ool:169803]JNDI lookup of the JMS connection factory weblogic.examples.ejb30.QueueConnectionFactory failed: javax.naming
.NameNotFoundException: Unable to resolve 'weblogic.examples.ejb30.QueueConnectionFactory'. Resolved 'weblogic.examples.
ejb30'; remaining name 'QueueConnectionFactory'>
一看就明白了。JMS没有配置。那我们去给Weblogic 配置JMS吧,我打开
public class ReviewListenerBean implements ReviewListener {
//The JNDI name of the Queue Connection Factory referenced here is specified by the mappedName attribute of @Resource,
//which can be overwritten in weblogic-ejb-jar.xml.
@Resource(name = "jms/mdbQCF", mappedName = "weblogic.examples.ejb30.QueueConnectionFactory")
private QueueConnectionFactory mdbQCF;
//The JNDI name of the Queue referenced here is specified by the mappedName attribute of @Resource,
//which can be overwritten in weblogic-ejb-jar.xml.
@Resource(name = "jms/mdbQueue", mappedName = "weblogic.examples.ejb30.ExampleQueue")
知道了需要配置的QueueFactory是 weblogic.examples.ejb30.QueueConnectionFactory
Queue是 weblogic.examples.ejb30.ExampleQueue
2,配置JMS。
第一步,创建一个JMS Server
点击New
新增一个JMS Server,
点击NEXT ,默认选项
点击NEXT,选择TARGET为当前的Server,如果是默认的Domain的话,应该是AdminServer
然后点击FINISH。成功创建JMS Server.
第二步,创建 JMS Modules。
点击Domain Structure -- Services -- Messaging--JMS Modules
然后点击NEW 按钮。
NEXT ,默认选项,
NEXT, Targets 选择 AdminServer.
然后NEXT, FINISH.
点击新建的 SystemModule-0,路径如下所示。
Home >Summary of JMS Servers >Summary of Store-and-Forward Agents >JMS Modules >Summary of JMS Bridge Destinations >Summary of Servers >Summary of Security Realms >Summary of Deployments >Summary of JMS Servers >JMS Modules >SystemModule-0