Messenger service using message driven beans
I need to implement a implement a messenger service. (using Messaging server, Message Queue, Message Clients and Message Driven Beans)
using netbeans 5.5
it should develop using EJB 3.0 architeture.
Can pls tell...how should i start this.(Basic steps of doing this)
Where should we write the Messaging server.(in a EJB 3.0 application...Is it?)
Any tutorial regrading this....!
EJBs and Message Driven Part.
what should i develop first. Messaging server OR Message Queue
How can i develop the Messaging Server. Do i need to use Message driven beans there?
Message was edited by:
jugp
Similar Messages
-
Best way to call web service from Message Driven Bean
I'm q'ing msgs up and would like to use a message driven bean to forward them to
an external web service. Weblogic workshop does not seem to support web service
controls in an EJB project. Any suggestions?
Thanks,
PaulPaul,
A non-trivial alternative, since you have the WSDL, would be to forget about trying
to use generated client code and just use JAX-RPC dynamic invocation instead.
That's how I call external web services from within an EJB in situations in which
generated client code cannot be incorporated prior to deployment. Minimally all
that is required is the WSDL and the service name, port name, and operation name,
although if non-builtin parameter types are used then you will have to manipulate
the service's type mapping registry.
Mark
"Paul" <[email protected]> wrote:
>
I've taken our wsdl and generated a web service in Workshop 8.1 using
XMLBeans.
This produces a web page that contains a link"Java Proxy" for downloading
generated
client code. I assume this is the same as clientgen. It's interesting
that
it does not
use XMLBeans like the web service that generated it. It uses a different
serialization
method.
I've used this generated code to call the web service. Although the
client seems
to run
successfully to completion, I get the following error in the weblogic
server console:
<Sep 29, 2003 7:46:24 AM EDT> <Error> <WLW> <000000> <Failure=com.bea.wlw.runtim
e.core.request.ResponseValidationException: java.lang.RuntimeException:
Protocol
'http-soap' not available on this operation. [ServiceException]>
<Sep 29, 2003 7:46:24 AM EDT> <Warning> <WLW> <000000> <Returning HTTP
500 due
t
o SOAP fault occurring on DispFile=pjm.srcm.webservices.face.Receptor>
Frustrating...
Bruce Stephens <[email protected]> wrote:
Hi Paul,
Could you not first use clientgen on the external webservice, then take
the stubs it created, then add these to your code along with the
onMessage(Message msg) and roll it into the MBean?
We don't have exactly that example, but you might take a look at this
one to get some ideas:
http://webservice.bea.com/message.zip
Hope this helps,
Bruce
Paul wrote:
Bruce,
Don't think this will work for us. We are receiving data internallythrough
a JMS queue. We need to pull it off the queue (MDB), massage it alittle and
send it to an external web service. The link you sent me was howto implement
a web service with JMS.
I started out by trying to use the Web Service and JMS controls butit doesn't
seem like I can use a JMS control because that requires a conversationID,
which we don't have because nothing is comming in through a web services.
Paul
Bruce Stephens <[email protected]> wrote:
Hi Paul,
There is a chapter in the docs on this. See if this helps,
http://edocs.bea.com/wls/docs81/webserv/jms.html#1067060
Thanks,
Bruce
Paul wrote:
I'm q'ing msgs up and would like to use a message driven bean to
forward
them to
an external web service. Weblogic workshop does not seem to supportweb service
controls in an EJB project. Any suggestions?
Thanks,
Paul -
Can anybody tell how to access web service from Message Driven bean
Can anybody tell how to access web service from Message Driven bean
Can anybody tell how to access web service from Message Driven bean
-
Access web service from Message Driven bean
Can anybody give code to to access webservice from Message Driven Bean
Can anybody give code to to access webservice from Message Driven Bean
-
Using Message Driven bean in JDev 9.0.3.2
Hi all,
I'm trying to create a Message bean in JDeveloper 9.0.3.2. I've used the wizard which has (very nicely) created me the bean files, i have also set up OC4J server and deployed to it and it seems to run fine.
Now, i'm trying to create a class (in the same project) that sends a message to the bean but i'm having problems. Session beans in JDev have a very nice option to create a Sample Java Client but there is no equivalent "Sample Message Creator" for message beans.
Anyway, my code is as follows...
Context ctx = new InitialContext();
TopicConnectionFactory factory = (TopicConnectionFactory)ctx.lookup("javax.jms.TopicConnectionFactory");
....more code to create and send message
However, i don't know where to lookup the factory from, this line gives me an error presumably because javax.jms.TopicConnectionFactory is incorrect. What is the Oracle lookup for this ? Where do i find it out from ?
Any advice would be appreciated, sorry this is not a posting on 10g which i haven't had chance to look at yet (though i hear it's very nice).
AlistairYou might find the sample code which is part of OC4J-howto's useful.
http://otn.oracle.com/tech/java/oc4j/904/index.html
http://otn.oracle.com/tech/java/oc4j/904/how_to/how-to-ejb-mdb.zip
raghu
JDev Team -
Distributed Garbage Collector (DGC) messages in cluster when using Message Driven Beans
Version: Weblogic 6.1 SP2
I'm seeing a lot of messages output on the node ** hosting my JMS
server/destination ** in the cluster
<Jun 4, 2002 5:35:03 PM EDT> <Info> <DGCserver> <Tried to renew lease on
lost reference: '448'>
Unfortunately, this message coincides with my MDB's ** on other nodes ** not
being able to lookup the JMS destination that they are configured for.
MDB's on the same node as the JMS server/destination are able to do lookups
fine.
Checking the JNDI tree on all nodes, I see the destinations replicated to
all nodes. The MDB's use the default (i.e WebLogic's) connection factory
(weblogic.jms.MessageDrivenBeanConnectionFactory) and I've bumped up the
polling interval to 5 minutes from the default of 10 seconds.
Any guidance on this would be greatly appreciated.
I see that there is a patch available to fix the DCC info messages (April
,2002) on dev2dev. Anyone know if this addresses the MDB problem?
Thanks in advance
FYI - in case anyone else sees this problem - it has been fixed in WLS 6.1
SP3.
If you are seeing this problem then you will see a log of
NoSuchObjectException's in your console.
Regards
"Prashant Nayak" <[email protected]> wrote in message
news:[email protected]...
> Version: Weblogic 6.1 SP2
>
> I'm seeing a lot of messages output on the node ** hosting my JMS
> server/destination ** in the cluster
>
> <Jun 4, 2002 5:35:03 PM EDT> <Info> <DGCserver> <Tried to renew lease on
> lost reference: '448'>
>
> Unfortunately, this message coincides with my MDB's ** on other nodes **
not
> being able to lookup the JMS destination that they are configured for.
> MDB's on the same node as the JMS server/destination are able to do
lookups
> fine.
>
> Checking the JNDI tree on all nodes, I see the destinations replicated to
> all nodes. The MDB's use the default (i.e WebLogic's) connection factory
> (weblogic.jms.MessageDrivenBeanConnectionFactory) and I've bumped up the
> polling interval to 5 minutes from the default of 10 seconds.
>
> Any guidance on this would be greatly appreciated.
>
> I see that there is a patch available to fix the DCC info messages (April
> ,2002) on dev2dev. Anyone know if this addresses the MDB problem?
>
> Thanks in advance
>
>
>
>
>
-
hi
i have some heavy calculating beans and i want that only one EJB is calculating at one time. can i do this by using Message Driven Beans? is it possible that the server creates only one Message Driven Bean at one time and gets the next one out of the queue when the old one finished calculating?
thanks, joIt is possible to set up that there should be only one mdb in the pool, but it's not quite what mdbs are intended for. Remember that this is an asynchronous message service, and you will not receive a reply after you put a message on the queue.
-
WebLogic hangs around after shutdown process appears to complete - Message Driven Bean related
On my current project we have some Ant scripts that automatically
start and stop WebLogic. The stop script equates to (not exactly but
close enough):
java weblogic.Admin -url localhost:8001 -password password -username
username SHUTDOWN
WebLogic is start and shutdown for each system module. All modules
use the exact same script for these two actions. Some of the modules
use Message Driven Beans and consequently, since these use JMS, a
JMSxxx.dat file is generated in the jms_store directory. As part of
the cleanup process the jms_store directory and all files in it are to
be deleted AFTER WebLogic shuts down.
The shutdown process works fine in all cases where JMS is not used and
in all cases where JMS IS used but there are NO message driven beans.
However, when there is a message driven bean the server does not shut
down in a timely manner, sometimes not at all (no error messages are
produced), and the JMSxx.dat file
remains locked. Consequently, all of the tests run via the ant script
for modules come to a grinding halt (i.e. environment could not be
cleaned so further tests would be skewed).
Can anyone shed some light on a definitive order of events during
WebLogic's shutdown process? What is the best way to test for the
server being up? I know there is a ping utility for weblogic - should
this be used or should a connection to a JNDI or JMS listening port do
the trick? Any other ideas would be welcome.
Thanks in advance,
MarkOn my current project we have some Ant scripts that automatically
start and stop WebLogic. The stop script equates to (not exactly but
close enough):
java weblogic.Admin -url localhost:8001 -password password -username
username SHUTDOWN
WebLogic is start and shutdown for each system module. All modules
use the exact same script for these two actions. Some of the modules
use Message Driven Beans and consequently, since these use JMS, a
JMSxxx.dat file is generated in the jms_store directory. As part of
the cleanup process the jms_store directory and all files in it are to
be deleted AFTER WebLogic shuts down.
The shutdown process works fine in all cases where JMS is not used and
in all cases where JMS IS used but there are NO message driven beans.
However, when there is a message driven bean the server does not shut
down in a timely manner, sometimes not at all (no error messages are
produced), and the JMSxx.dat file
remains locked. Consequently, all of the tests run via the ant script
for modules come to a grinding halt (i.e. environment could not be
cleaned so further tests would be skewed).
Can anyone shed some light on a definitive order of events during
WebLogic's shutdown process? What is the best way to test for the
server being up? I know there is a ping utility for weblogic - should
this be used or should a connection to a JNDI or JMS listening port do
the trick? Any other ideas would be welcome.
Thanks in advance,
Mark -
Need to Parse XML Message from my Message Driven Bean
Hi
I am using Message Driven Beans for listening to a Queue .
I am getting a Big XML file from my Queue in form of a TextMessage .
Now my task is to read / parse the XML Message .
Please tell me what is the appropiate parsing technique i need to use (Should i use SAX or DOM )
Please share your ideas .
Thank you .Generally you want to use SAX if the file is so big that loading it all in memory (as DOM does) will create memory problems.
Read about these methods on the wiki page for [JAXP.|http://en.wikipedia.org/wiki/Java_API_for_XML_Processing] -
Is Message Driven Beans Supported in iAS 6.5?
Hello Everybody,
Admin guide of iAS 6.5 speaks about using Message driven beans (mdb). It also says that iAS 6.5 supports EJB 1.1 specification. But, EJB 1.1 specification doesnt support mdbs. Only EJB 2.0 does this. Then how come iAS 6.5 supports mdb, when it says that it is EJB 1.1 complaint and not EJB 2.0 complaint.
Please clear this doubt for me.
regards,
desiganIt is me who is posting again.
This is what provided in the Developer guide. I have just read it.
"iPlanet Application Server, Enterprise Edition 6.5, provides support for deploying message-driven beans. This implementation is based on the EJB 2.0 specifications,
and is for developer use only. The message-driven bean infrastructure in this release has not been tested in a production environment."
regards,
desigan -
Transactional onMessage without message driven beans
Hi.
Imagine a system that does not use message driven beans, but instead a non-EJB MessageListener that invokes some SessionBean method in its onMessage(), as described for example in "http://www.theserverside.com/resources/article.jsp?l=Bringing-Together-Application-Servers-and-JMS-Messaging".
Is it possible to execute the MessageListener.onMessage() and the SessionBean.someMethod() in the same transaction, in such a way that the message is not being removed from the queue if processing in the EJB fails? With JMS methods, given the JMS provider is JTA - capable?
Products would be WebSphere 4.0.1 an MQSeries.
Any hints would be appreciated,
thanks,
LutzYes, If the Jms Provider is JTA capable then the OnMessage method can be made transactional.
Go thru XA package of jms specification.
-Ashish -
Problem deploying message driven bean using Log4j
Hello all.
Using JDeveloper 11.1.1.0.2, I'm having a problem with a message driven bean I've created and associated with a JMS queue.
I've created an EJB Module project in my application (in which some other projects exist), and created the bean. A simple test of the bean, sending a message through the jms queue and printing it on system.out in the mdb onMessage() worked just fine.
However, when I add apache commons logging to my mdb, things start to go wrong. Running the project on the integrated weblogic 10.3 server just fails during deployment, due to a NoClassDefFoundError on org/apache/log4j/Logger.
In project properties -> libraries and classpath, I've added a log4j library (Log4j-1.2.14.jar) next to Commons Logging 1.0.4 but it doesn't seem to matter anything.
The code of my message bean:
@MessageDriven(mappedName = "weblogic.wsee.DefaultQueue")
public class MyMessageBean implements MessageListener {
// logger
private static Log sLog = LogFactory.getLog(MyMessageBean.class);
public void ejbCreate() {
public void ejbRemove() {
public void onMessage(Message message) {
MapMessage mapmsg = null;
try {
if (message instanceof MapMessage) {
mapmsg = (MapMessage)message;
boolean msgRedelivered = mapmsg.getJMSRedelivered();
String msgId = mapmsg.getJMSMessageID();
if (!msgRedelivered) {
sLog.debug("****** Successfully received message " + msgId);
} else {
sLog.debug("****** Successfully received redelivered message " + msgId);
// Haal de inhoud op:
int testInt = mapmsg.getInt("TestInt");
sLog.debug("TestInt:" + testInt);
} else {
sLog.debug("Message of wrong type: " +
message.getClass().getName());
} catch (Exception e) {
sLog.error("Fout in verwerken",e);
}Does anybody have any clue as to what I might be doing wrong or missing out here?
The complete stacktrace:
5-aug-2009 12:54:44 oracle.adf.share.config.ADFConfigFactory cleanUpApplicationState
INFO: Cleaning up application state
java.lang.ExceptionInInitializerError
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processWLSAnnotations(EjbAnnotationProcessor.java:1705)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processWLSAnnotations(EjbDescriptorReaderImpl.java:346)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:192)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197)
at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89)
at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723)
at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190)
at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@51b296 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@51b296 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger))
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
at nl.justid.dolores.mdb.MyMessageBean.<clinit>(MyMessageBean.java:19)
... 32 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@51b296 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
... 36 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
at java.lang.Class.getConstructor0(Class.java:2699)
at java.lang.Class.getConstructor(Class.java:1657)
at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
... 37 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 42 more
<5-aug-2009 12:54:44 uur CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1249469684085' for task '14'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.'
weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
Truncated. see log file for complete stacktrace
>
5-aug-2009 12:54:44 oracle.adf.share.config.ADFConfigFactory cleanUpApplicationState
INFO: Cleaning up application state
<5-aug-2009 12:54:44 uur CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'Dolores'.>
<5-aug-2009 12:54:44 uur CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
Truncated. see log file for complete stacktrace
>
[Deployer:149034]An exception occurred for task [Deployer:149026]deploy application Dolores on DefaultServer.: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null..
weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.
#### Deployment incomplete. #### Aug 5, 2009 12:54:44 PM
oracle.jdeveloper.deploy.DeployException
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
Caused by: oracle.jdeveloper.deploy.DeployException
at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
... 11 more
Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
... 12 more
#### Cannot run application Dolores due to error deploying to DefaultServer.
[Application Dolores stopped and undeployed from Server Instance DefaultServer]Thanks in advance!
Greetings,
Eelse
Edited by: Eelse on Aug 5, 2009 1:57 PM
Edited by: Eelse on Aug 5, 2009 5:39 PMCreating a new deployment profile (EAR) and including the original deployment (JAR) and the needed libraries (in a lib-directory) solved the problem.
-
Message-Driven Bean using @Resource annotation
I am trying to run a Message-Driven Bean very simple example in https://glassfish.dev.java.net/javaee5/ejb/examples/MDB.html
I configured MDBQueueConnectionFactory and MDBQueue properly on glassfish admin console.
I cannot run the example using @Resource annotation. I don't understand why.
@Resource(mappedName="MDBQueueConnectionFactory")
private static QueueConnectionFactory queueCF;
@Resource(mappedName="MDBQueue")
private static Queue mdbQueue;But I can run this example modifying the source code using InitialContext instance and looking up for JMS Resources.
InitialContext ctx = new InitialContext();
QueueConnectionFactory queueCF=(QueueConnectionFactory)ctx.lookup("MDBQueueConnectionFactory");
QueueConnection queueCon = queueCF.createQueueConnection();
Queue mdbQueue=(Queue)ctx.lookup("MDB");
queueSender.send(mdbQueue, msg);
...I want to figure out why @Resource annotation do not work well. Any help?
Thanks in advanced any help.Thanks for your reply.
The error that I get is a simple NullPointerException. Nothing else.
Like you said, I develop a servlet and I can use @Resource annotation without static reference, and it works.
public class TestMDB extends HttpServlet {
private static final long serialVersionUID = 1L;
@Resource(mappedName="MDBQueueConnectionFactory")
private QueueConnectionFactory queueCF;
@Resource(mappedName="MDB")
private Queue mdbQueue;
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = response.getWriter();
out.println("TEST MDB "+queueCF);
QueueConnection queueCon;
try {
queueCon = queueCF.createQueueConnection();
QueueSession queueSession = queueCon.createQueueSession
(false, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = queueSession.createSender(null);
TextMessage msg = queueSession.createTextMessage("hello");
queueSender.send(mdbQueue, msg);
out.println("Sent message to MDB");
queueCon.close();
} catch (JMSException e) {
e.printStackTrace();
}But my question were about using @Resource annotation on a standalone client. I always get NullPointerException.
public class MDBClient {
@Resource(mappedName="MDBQueueConnectionFactory")
private static QueueConnectionFactory queueCF;
@Resource(mappedName="MDB")
private static Queue mdbQueue;
public static void main(String args[]) {
try {
QueueConnection queueCon = queueCF.createQueueConnection();
QueueSession queueSession = queueCon.createQueueSession
(false, Session.AUTO_ACKNOWLEDGE);
QueueSender queueSender = queueSession.createSender(null);
TextMessage msg = queueSession.createTextMessage("hello");
queueSender.send(mdbQueue, msg);
System.out.println("Sent message to MDB");
queueCon.close();
} catch(Exception e) {
e.printStackTrace();
} -
Message driven beans practical use
Hi,
I wanted to know,where Message driven beans are used in actual commercial projects???
Thanks in advance.Hi,
Without naming any particular projects, i can asure you that MessageDriven Beans are used in commercially deployed systems.
Most important is to recognise the goal of MDBs. Everything inside a J2EE server is Request-Response like. Session and Entity beans react on requests. Because of the life cycle of these types of EJBs waiting for incoming messages is not realy a good idea.
In all cases were asynchronous middleware solutions are used, like MQ series for example, MDBs are used to listen for and react on incoming messages.
Furthermore, MDBs are used to decouple web tier from business tier where processing times of incoming data is too long to wait for by the clients.
Robert -
B2B using JMS and Processing Messages with Message Driven Beans
We want to be able to use B2B to send messages to a JMS queue and then process messages from B2B using a Message Driven Bean. Is this supported.
We are using B2B 10.2.0.2 with Patchset 4.Hello,
In 10.1.2.0.2 B2B , as part of the internal Delivery channel B2B can only send and receive messages from JMS queues.
Rgds,Ramesh
Maybe you are looking for
-
Read this if you want to replace your CD/DVD
The best replacement is the Pioneer DVR-110blk (the blk stand for black), it writes 56x CD-R, CDRW, DVD-R, 16x DVD+R, 16x Dual Layer & DVD-RAM. It is recognised by OSX 10.4 & works best using the latest Roxio Toast ( it also recognised by itunes & ca
-
Automatic App Updates in iOS 7
Hello, I have automatic app updates turned on but it doesn't seem to be doing anything. I've had to update my app manually so far. Right now I have three listed as "pending" but they haven't downloaded yet. Is there some kind of delay? Thanks.
-
Hey guys not gunna start saying BT promised this and that just looking for a bit of advice. For the last year or so my speed has been a pretty constant 63Mb I check it often with the Bras checker. Suddenly a few weeks ago it went UP to 69Mb (download
-
Using ipod classic to store complete library to transfer to new hard drive:
My itunes files are about to outgrow my hard drive. Can I use an ipod classic (7th gen) to store my entire library, and then, after installing a larger hard drive, "re-copy" my library from the ipod onto the new hard drive? And would it retain the fi
-
Process with an ID not running
Hi, I browse lot of websites and could not find any solution for this problem. I did add CSRUN_AROUND_WORKABOUTS to environmental settings. Rename IISEXPRESS folder Change application config settings but nothing worked. I need help to sort it out.