How to use JMS in a J2EE environment
Hello all,
I would like to find out how to use JMS in a J2EE environment. I use Borland Enterprise Server. Do I need to buy a message software to use JMS? How to use JMS with Message Driven bean?
Thanks a lot.
Best regards
Susan
If you don't want to buy you could try OpenJMS, a free JMS product (http://openjms.sourceforge.net/)
As for learning how to use JMS w/ MDBs, I would suggest grabbing a book on JMS. I found the OReilly book on JMS to be pretty helpful for me.
Similar Messages
-
How to use crystal report in J2EE Project.
how to use crystal report in J2EE Project.. any one know please inform me...
thank you..http://www.inetsoftware.de/products/crystalclear/Crystal-Reports.htm?adwords=googleCrystal&gclid=CKDD1YDem5UCFRpknAodZA4EhA
I think this might help u... -
How to enable JMS to be J2EE Compliant from within JVM
I am wondering how I can use JMS in J2EE compliant mode from within the JVM via a Java stored procedure.
I know that I can set a property (i.e. oracle.jms.j2eeCompliant="true") at execution time, but was wondering how I can make the entire JVM J2EE compliant.You cannot make the JVM J2EE compliant! However, you can use some J2EE APIs such as JMS, on top of J2SE.
See a basic use of JMS in Java stored procedure
http://otn.oracle.com/sample_code/tech/java/jsp/samples/jms/Readme.html
Note: the main purpose of JMS support within the database is to integrate with AQ.
Kuassi -
Using JMS adapter with J2ee native queuing system
Hi there,
As far as I have understood J2EE contains it's own native queuing system (JMS). Since the J2EE is part of the WAS, shouldn't it be possible to somehow use XI's JMS adapter in conjunction with this native JMS?
I've tried to search many places in many ways, but haven't been able to find any info. Is it possible at all?
Hope, some of u guys can help out there:-)
Regards,
DanielHi Keith,
It looks as if you are in the same situation.
We have this working very nicely now and I'm happy to share. In fact I was just granted wiki permissions so I can add the information there along with screen shots.
Informaiton on this configuration is very scattered but I imagine many people would find it useful for integrating with Mainframes without adding any complexity to the legacy environment. Let me come back to you with some more inormation, but for now you can get started with this:
Insert a module as the 3rd line in your Module Processing Sequence to use AF_Modules/MessageTransformBean and give it a key in order to associate with the parameters you will need to type in below. These parameters are very similar to normal XI File adapter parameters.
SAP Note 793922 has more info on the parameters... not the greatest reference I know.
Also this has some info...
http://help.sap.com/saphelp_nw04/Helpdata/EN/57/0b2c4142aef623e10000000a155106/content.htm
I'll try and get some screen shots up on the Wiki. -
How to use JMS with tomcat and Axis
Hello
I'm new in ii, so i'm still a little bit lost. I have been implementing web services with tomcat and Axis. However, these services are synchronous and I would like that some services were asynchronous.
I've been reading about the topic and I've found that JMS is a good solution for it. I have already downloaded JMS in my computer but now I don't know what else to do. I've been trying to run the SimpleQueueSender.java example but I get the error:
JNDI API lookup failed: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
But I have attached all .jar from F:\Sun\MessageQueue\lib
In addition to this, for my first webservices I used the Java2WSDL, WSDL2Java and AdminClient (axis tool) to create my web services bindings, stubs and skeletons and to deploy the web service on the server. Do I have to use them now with JMS? or now the deployment must be performed in a different way?
Thank you in advanced,The error means that you have to specify the type and location of your jndi store. You could create a jndi.properties file and put two properties in it:
java.naming.provider.url=file\\\:////var/jndi
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
for a file based jndi store. Then you have to make sure your jndi.properties file is in your CLASSPATH. Then you have to use something like imqadmin to create your jndi store and store in it your administrative objects like Queues and QueueConnectionFactories. -
How to Use iSetup to create new environment in copy of clean master.
Hi,
I want to use iSetup to create a complete new environment. No manual setup has been done yet in the copy of the master (no Business Group, No OU, no Chart of Acc: nothing). Source environment is being setup rightnow by functional consultants
Can one please provide me with a manual or guideline how to start this challenging job. Maybe a best practise can be used ?
In the end we want to setup an environment based on a clean master.
( practical data: eBS 12.1.2 on linux )
Thanks in advance
GuidoHi Guido,
You can get in touch with [email protected] who is the product manager for iSetup. He would able to assist you to go forward in the right direction. -
OSB : How to use JMS Correlation ID to associate Reqeust with the Response
Hi,
I am using a business service to publish request on the queue. Now I want to use the same Business Service to send back me the response based on the JMS Correlation ID. Right no I am just trying to get the response without applying any logic to the JMS Correlation ID but its not working. Can any body let me know how to do this.
Regards,
Anuj MaheshwariUse response by Correlation ID pattern as specified in this link:
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/interopjms/MsgIDPatternforJMS.html#wp1050154 -
How to use connection pools in production environment
Hai
We are using Statless Session beans which will call bean managed entity beans
as a developer we completed the first phase of our project successful but when
comming to the production environment they(Higher authoritites of the company)
are asking abt the connection pools. Suppose if my wlserver5.1 has 100 hits per
a second how many connection pools i need to put in the production envirornment
and also is it the right way to increase the connectionpools depends upon the
clients hits????. Can anybody help me regarding this It is very urgent for us.
Cheers Kiran NallamHi Aravind,
It can be used only for calculation kinda "minimum size".
Nothing can prevent a developer from writing something
like this:
Connection con1 = ds.getConnection();
Connection con2 = ds.getConnection();
Connection con3 = ds.getConnection();
Regards,
Slava Imeshev
"Aravind Krishnasamy" <[email protected]> wrote in message news:3bfa85f6
You can fix the size of the weblogic connection pool depending on yourexecute
thread count value. For example the default value of execute thread countvalue
is 15. So at a given point of time you cannot use more then 15 databaseconnection.
Database connection pool size should be equal to or less then the size ofexecute
thread count
"Slava Imeshev" <[email protected]> wrote:
Hi Kiran,
It's hard to provide exact dependence between number of hits
and actual number of consumed connections because it's a highly
variable distributed environment. But the general approach is
simple - before rolling out your application, make sure you
tested it under simulated peak load. Your connection pool should
have enough connections to serve peak load. Without such a testing
you will never know whether your app scales or not.
Regards,
Slava Imeshev
"Kiran" <[email protected]> wrote in message
news:3bf9d676$[email protected]..
Hai
We are using Statless Session beans which will call bean managed entitybeans
as a developer we completed the first phase of our project successfulbut
when
comming to the production environment they(Higher authoritites of thecompany)
are asking abt the connection pools. Suppose if my wlserver5.1 has100
hits per
a second how many connection pools i need to put in the productionenvirornment
and also is it the right way to increase the connectionpools dependsupon
the
clients hits????. Can anybody help me regarding this It is very urgentfor
us.
Cheers Kiran Nallam -
How to use "csscan" on RAC 10g environment
Hi all,
I have a 10g RAC database whose character set is US7ASCII, and needs to converted to WE8ISO8859P1.
I need to run "CSSCAN" to get the information regarding possible issues for this charset conversion.
Per Oracle Doc, cluster_database should be set to FALSE before running CSSCAN & CSALTER.
For the time being, I only need to run CSSCAN to analyze charset convertion factivility (I will not
run CSALTER).
My concern is if the setting of cluster_database=false and the bounce of the instances can be avoided
having into account that I will not run CSALTER.
I will aprecciate your replies.
thanks
GustavoCSALTER is the one who demands cluster_database=false, so you can use CSSCAN without setting this parameter.
Enrique -
Can I use JMS in Java SE?
Hi,
We are developing a desktop application in plane Java SE.
We thought of using JMS for the client-server events propagation.
Is it possible to use JMS without a J2EE application server?
I know I can do it in Spring, but we don't want to use the Spring framework just because of JMS.
Please let me know if there is a way to incorporate JMS in Java SE desktop application.
Thanks much,
SandeepHi,
We are developing a desktop application in plane Java SE.
We thought of using JMS for the client-server events propagation.
Is it possible to use JMS without a J2EE application server?
I know I can do it in Spring, but we don't want to use the Spring framework just because of JMS.
Please let me know if there is a way to incorporate JMS in Java SE desktop application.
Thanks much,
Sandeep -
How to use Sql Loader in Unix Environmant
Hi All,
Can anyone explain me please how to use sql Loader in unix environment.
Actually i have one control file i want to run that file in Unix how can i achive please explain me
Thank'sHi Kuljeet,
Thank you for your replay
I just put my control file into the Unix Environmant that's fime
and when i trying to entering the following cmd in Unix environment i am getting this error
sqlldr username/password@string control='unix_pathname'i am not sure about the path name my question is
1) Do i need to give the Local file Path Or Unix Path
This is the error in Sql Loader:
SQL*Loader: Release 10.2.0.4.0 - Production on Mon Sep 24 13:14:23 2012
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-500: Unable to open file (/bx167a/riskbatch/rdwdbat/sample_upl.upl)
SQL*Loader-553: file not found
SQL*Loader-509: System error: No such file or directory
Could you please correct me
Thank's -
Hello All,
I am trying to dequeue a message using the JMS . i am able to connect to the AQ . I set the Message type as JMS text message . when i start the receiver it give's me ADT payload Exception.
Can some one guide we with a tutorial or article which will explain we the flow. i tried to google but i am getting confused on read some of the articles ( which is alot for starters !!!!!) .
Thank You in AdvanceWithout knowing what you are doing I can't tell whether you need information on how to use JMS (which is a standard API implemented by many products) or whether you need information specific to Oracle Advanced Queueing (AQ). The exception you mention is not a JMS exception.
For questions about AQ, try the AQ forum at
Advanced Queueing
Nigel -
How to use remote JMS in websphere5?
I want to use JMS in another server to send message so that I config required jndi in server. When I lookup local JMS jndi(connection factory, queue) it works correctly. But when I lookup remote connectionfactory, it throws 'javax.naming.CommunicationException'. BTW, local configuration is same as JMS server. And I use WSAD 5.1.1 to develop it.
The first question is if I need use JMS server on another server, I should lookup remote queue and JMS connection factory on that server, right?
The second question : If yes, how to obtain remote JMS connection factory? I use WSAD 5.1.1 trail, I don't know is it possible to obtain remote jndi.
The third question : do I need change any configuration for supporting remote JMS client instead of local(same compute, different jvm) environment?
The following is my client code to obtain remote queue:
public class Test {
public static void main(String[] args) {
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "corbaloc:iiop:10.240.4.203:2809");
try {
Context initialContext = new InitialContext(env);
Object obj = initialContext.lookup("jms/IPharmQueue1");
} catch (NamingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}It works ok when ip is localhost. But it can obtain remote queue or connectionfactory. I tried to lookup other EJB, it also failed.Actually, I have application in one server and four same server as cluster. But only one server provides JMS service. So my application need to use remote JMS server instead of local server. But in my development environment I can not simulate cluster environment as customer environment. So I try to let my application access remote JMS server in different computer. When two server start up I found my application will get local JMS connection factory and queue instead of remote factory. Even I put IP of another computer in PROVIDER_URL.
I did a application client to test it. The code is above. But it can not lookup remote jndi.
I use WAS5 as server and WSAD 5.1.1 as development IDE.
Is any idea about it? -
How to access JMS queues in the SAP J2EE Engine?
Hi Gurus,
Can anybody know how to access the jms dead message queues in the XI J2EE Engine (which is WAS 6.40)?
I have read in the SAP documentation that we can use some JMS commands from the telnet. I don't know how to use those commands.
Can anybody provide a step-by-step process to access these queues?
Thanks
Kalyan1) Open a command prompt
2) type
telnet localhost 50008
where the port is the same as your http, but with 8 as last digit.
3) Login
4) Issue the following set of commands
jump 0
add jms
jms list deadmsgs
Check by man jms other possible options.
HTH
Peter -
Using JMS to connect to Sun's 1.4 J2EE server
Hi,
I've been reading around various postings detailing how to connect to J2EE servers at runtime, and they all seem to follow the format:
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.enterprise.naming.SerialInitContextFactory");
props.put(Context.PROVIDER_URL, "rmi://localhost");
// Create a JNDI API InitialContext object
// (may throw a NamingException)
jndiContext = new InitialContext(props);
But none of the discussion is totally complete. It seems incredibly difficult to connect to a J2EE server, and the documentation on the issue is incredibly poor.
I'd like to do this without the 'appclient' program that comes with Sun's J2EE server as I wish to have a development environment that can start up, connect to the J2EE server, and send messages.
So has anyone managed to get this to work?
I'm confused to where the username and password go. I've seen other suggestions to make the above work, including:
props.put("org.omg.CORBA.ORBInitialPort", "3700");
props.put("org.omg.CORBA.ORBInitialHost", "localhost");
ORB orb = ORB.init(new String[] {}, props);
props.put("java.naming.corba.orb", orb);
Therefore can anyone clear this up for me! A few lines of code, showing exactly how I can connect to a J2EE server.
All I want to do is send a few messages.. :)
Cheers
JohnHello everyone;
Actually I have a error below;
Feb 23, 2006 11:52:27 PM com.sun.corba.ee.spi.logging.LogWrapperBase doLog
INFO: "IOP00710299: (INTERNAL) Successfully created IIOP listener on the specified host/port: all interfaces/1973"
Feb 23, 2006 11:52:36 PM com.sun.enterprise.connectors.util.SetMethodAction handleException
WARNING: RAR7096: Exception null while trying to set the value on property Name
Feb 23, 2006 11:52:36 PM com.sun.enterprise.naming.SerialContext lookup
SEVERE: NAM0004: Exception during name lookup : {0}
com.sun.enterprise.resource.PoolingException
at com.sun.enterprise.connectors.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:143)
at com.sun.enterprise.naming.factory.AdministeredObjectFactory.getObjectInstance(AdministeredObjectFactory.java:89)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:293)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javaapplication17.Main.main(Main.java:39)
Caused by: java.security.PrivilegedActionException: com.sun.enterprise.connectors.ConnectorRuntimeException
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.connectors.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:139)
... 5 more
Caused by: com.sun.enterprise.connectors.ConnectorRuntimeException
at com.sun.enterprise.connectors.util.SetMethodAction.handleException(SetMethodAction.java:110)
at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:96)
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:69)
... 7 more
Caused by: java.lang.IllegalArgumentException: MQ:Queue:Invalid Queue Name -
at com.sun.messaging.Queue.setName(Queue.java:64)
... 12 more
javax.naming.CommunicationException: serial context communication ex [Root exception is com.sun.enterprise.resource.PoolingException]
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:317)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javaapplication17.Main.main(Main.java:39)
Caused by: com.sun.enterprise.resource.PoolingException
at com.sun.enterprise.connectors.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:143)
at com.sun.enterprise.naming.factory.AdministeredObjectFactory.getObjectInstance(AdministeredObjectFactory.java:89)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:293)
... 2 more
Caused by: java.security.PrivilegedActionException: com.sun.enterprise.connectors.ConnectorRuntimeException
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.connectors.AdministeredObjectResource.createAdministeredObject(AdministeredObjectResource.java:139)
... 5 more
Caused by: com.sun.enterprise.connectors.ConnectorRuntimeException
at com.sun.enterprise.connectors.util.SetMethodAction.handleException(SetMethodAction.java:110)
at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:96)
... 7 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.enterprise.connectors.util.SetMethodAction.run(SetMethodAction.java:69)
... 7 more
Caused by: java.lang.IllegalArgumentException: MQ:Queue:Invalid Queue Name -
at com.sun.messaging.Queue.setName(Queue.java:64)
... 12 more
I tried everything in this form but I could not send a message to queue from my standalone client.
I am trying to communicate with my application server throught JMS almost a week. But I could not get any result. I even read twice some forms. Actually all I can say I progressed to here..
My code is below...
Context initialContext = new InitialContext();
javax.jms.QueueConnectionFactory factory = (javax.jms.QueueConnectionFactory) initialContext.lookup("jmsFactory");
Destination queue = (javax.jms.Queue) initialContext.lookup("jmsQueue");
javax.jms.QueueConnection connection = factory.createQueueConnection();
javax.jms.QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
On the jmsQueue lookup there is the error... I create all the resources in my Sun System Application Server 8.2 PE...
Please help or say some thing?
.....
Maybe you are looking for
-
Why can't I print out PDF files downloaded from the internet?
Such as medical files, applications, etc. They just end up as an "error" in my printer queue. I have used four different printers and three differnt iMac computers. Same problem. What is UP? Do I have to convert it? Becxause, when I do -- and it so g
-
Creating partitions based on date
Hello Friends, I want to create a table ( x_acc_nnm) with a column x_as_of_dt ( Datatype Date dd/mon/yyyy ) partition on x_as_of_dt. Want to partition the table on x_as_of_dt based on YYYYMM appreciate your help. thanks/Kumar
-
hi frnd's. whether we can add a value to a dropdown box at run time. I had done by selecting from a dropdownbox with available datas.
-
Need help for configuring integration scenario for AII
Hi, We are referring to "RFID-Enabled Outbound Processing: Configuration Guide" for transferring materials from ECC to AII through XI. So far we have been successful sending the IDOC to XI. When we display the XML message in XI using IDX5, we get the
-
8.1.6 JDBC-Thin on NT appears to have a problem
I could just be experiencing the wonders of Windows NT but I am having a problem connecting to our Oracle Database using JDK1.2.2 and the 8.1.6 thin drivers. I downloaded and installed the classes12.zip and my program finds and loads the driver just