Running JMS client on multiple systems (using J2EE 1.4)
Hello all,
Can anyone tell me if it is possible to run a JMS client on a system that is not running a J2EE server on localhost? Is there any way to reference the server on another machine (using J2EE 1.4 server)??
I found information in the J2EE 1.3.1 tutorial that tells of ways to
- run the client program with both systems running the server
- run the client program with only one system running the server (which isn't localhost)
However, the corresponding portion of J2EE 1.4 tutorial only specifies running the client with App server running on both systems...... does this mean that we cannot run a standalone client program with no server on localhost in case of the 1.4 server?
Also, most of the tutorials on JMS I have seen so far only explain the scenario with both the client and the server on a single machine. Is this how average JMS applications work?? What I mean to ask is, in a typical scenario where does a JMS client run....?? at the server, or at the client (which may or may not be running a server at localhost).
Thanks for your time.
The functionality has not changed in J2EE 1.4 outside of reving to JMS 1.1
Similar Messages
-
Running JMS Client Programs on Multiple Systems?
Has anyone gotten JMS to work on Multiple Systems
using Windows 2000 on both systems? The JMS Tutorial
doesn't seem to work for me even if I repeat the steps
over an over again (maybe it's incorrect)?
Well, anyway, what I'd really like to do is to run
JMS between different systems using tcp/ip. Is this
possible?Hey There,
Same thing happens to me. Since your message and others went unanswered, I am being to think this is a dirty little secret. -
hi, i want to control my vi from multiple systems using ethernet options can any body tell me how to do that? thans in advance
There are multiple ways of doing this. Here are some of them..
The Web Publishing tool allows you to publish the front panel and you can control the front panel remotely.http://www.ni.com/white-paper/2911/en/
The TCP/IP socket can allow you to pass codes "strings" to another computer. Lookup the server client example.
regards,
Gautham -
Running JMS Client Programs on Multiple Systems using J2EE1.4
Hi all,
I have 1 message producer and about 100 clients on different systems in the network which receive the messages.
At the moment I am running a J2EE1.3 server on the sender side and the client programs are startet with -Dorg.omg.CORBA.ORBInitialHost=sender hostname to access the remote system.
My problems:
1. I upgraded my client program to java1.5 , but jdk1.5.0_01/jre/lib/rt.jar doesn't contain com/sun/corba/se/internal/util/JDKBridge -> it`s not possible to execute corba calls any more.
2. If you upgrade J2EE1.3 to J2EE1.4 sender and receiver system must both be running the J2EE Application Server, but I want only the the sender system to run J2EE.
I have no idea how to solve these problems and would be happy about every assistance.
Thanks,
ElkeHi
I would suggest posting this into the J2EE 1.4 (application server) forum. You will have a better chance of getting help there, since, while your application is JMS based, it is not a JMS issue.
TE -
Generate clients for multiple WSLDs using 'clientgen' task.
Issue -
I am trying to generate WS clients for multiple Services(WSDLs). I am using 'clientgen' task. But a 'clientgen'task accepts only one WSDL. If I have more one that one 'clientgen' task, some of the
common classes (generated) are overwritten.
For eg.
WSDL for Contract 1
<s:element name="executeResponse">
<s:complexType>
<s:sequence>
<s:element ref="soa:CancelOrderResponse"/>
</s:sequence>
</s:complexType>
</s:element>
<message name="executeSoapOut">
<part name="parameters" element="s0:executeResponse"/>
</message>
<portType name="CancelOrderSoap">
<operation name="execute">
<input message="s0:executeSoapIn"/>
<output message="s0:executeSoapOut"/>
</operation>
</portType>
<service name="CancelOrder">
<port name="CancelOrderSoap" binding="s0:CancelOrderSoap">
<soap:address location="http://localhost:7001/CoreWSProject/sync/CancelOrder.jws"/>
</port>
</service>
WSDL for Contract 2
<s:element name="executeResponse">
<s:complexType>
<s:sequence>
<s:element ref="soa:CancelOrderResponse"/>
</s:sequence>
</s:complexType>
</s:element>
<message name="executeSoapOut">
<part name="parameters" element="s0:executeResponse"/>
</message>
<portType name="CancelOrderSoap">
<operation name="execute">
<input message="s0:executeSoapIn"/>
<output message="s0:executeSoapOut"/>
</operation>
</portType>
<service name="CancelOrder">
<port name="CancelOrderSoap" binding="s0:CancelOrderSoap">
<soap:address location="http://localhost:7001/CoreWSProject/sync/CancelOrder.jws"/>
</port>
</service>
GENERATED CODE
A class ExecuteResponse will be generated for each service. This class gets overwritten if you use
multiple 'clientgen' tasks.
Question
Is there way to specify multiple WSDLs in 'clientgen' task so that i should be able to package
all the clientcode in one jar without any namespace issues ?
- Sandeep VIf the classes have the same namespace, by default, the same Java package name will be created. There is a packageName attribute on the clientgen Ant task, which provides some control over the Java package name that is used.
There is no way to specify multiple WSDLs to the clientgen Ant task. This makes sense if you subscribe to the notion that a WSDL represents a Web Service. It sounds like you can achieve what you want by:
1. Running clientgen on the first WSDL,
2. Use Ant to extract the contents of the generated JAR into a directory (with a name like clientgen),
3. Running clientgen on the next WSDL,
4. Use Ant to extract the contents of the generated JAR into the same clientgen directory,
5. etc, etc.
Afterwards, you would just need to use Ant to JAR up the clientgen directory. Again, you'll want to specify a different packageName attribute for each WSDL.
HTH,
Mike Wooten -
-- Error during running JMS client --
Hello ,i m novice in JMS,just trying to Implement my first JMS programming on WL8.1,I m getting error during Run client program
My client program is below :
package examples;
import javax.naming.*;
import javax.jms.*;
import java.util.*;
public class Client
public static void main(String[] args)throws Exception
Properties props = System.getProperties();
props.put(Context.PROVIDER_URL,"t3://localhost:7001");
props.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
Context ctx=new InitialContext(System.getProperties());
TopicConnectionFactory factory=(TopicConnectionFactory)ctx.lookup("javax.jms.TopicConnectionFactory");
TopicConnection connection = factory.createTopicConnection();
TopicSession session=connection.createTopicSession(false,Session.AUTO_ACKNOWLEDGE);
System.out.println("Envi Veraibles" + ctx.getEnvironment().toString());
System.out.println("Object Retrived "+ctx.lookup("testtopic").toString());
Topic topic =(Topic)ctx.lookup("testtopic");
TopicPublisher publisher=session.createPublisher(topic);
TextMessage msg=session.createTextMessage();
msg.setText("This is a test message");
publisher.publish(msg);
I m getting error during running client ::
Exception in thread "main" java.lang.ClassCastException: weblogic.jms.client.JMSConnectionFactory examples.Client.main(Client.java:23)
i think error is due to this line
Topic topic =(Topic)ctx.lookup("testtopic");
Pls Help me
Thnx in Advance ...First of thanks for gave me a Reply.
(1) System.out.println("Object Retrived "+ctx.lookup("testtopic").toString()); this line is nothing just i wanted to check that program giving me a object or not .and output of this line is
Object Retrived weblogic.jms.client.JMSConnectionFactory@1f66cff
(2)Testtopic is not a object but it is JNDI name whichever i specified in webligic-ejb-jar.xml
(3)i added this line System.out.print("Second output"+ctx.getClass().getName()); and i got this output:
Second output javax.naming.InitialContext
but still i m getting same error
here i m describing my code for ejb-jar.xml
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<!-- Generated XML! -->
<ejb-jar>
<enterprise-beans>
<message-driven>
<ejb-name>LogBean</ejb-name>
<ejb-class>examples.LogBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>LogBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
(2)*LogBean.java*
package examples;
import javax.ejb.*;
import javax.jms.*;
import javax.naming.*;
public class LogBean implements MessageDrivenBean,MessageListener
protected MessageDrivenContext ctx;
public void setMessageDrivenContext(MessageDrivenContext ctx)
this.ctx=ctx;
public void ejbCreate()
System.err.println("ejbCreate()");
public void onMessage(Message msg)
if(msg instanceof TextMessage) {
TextMessage tm=(TextMessage)msg;
try
String text=tm.getText();
System.err.println("Received new message:"+text);
catch (JMSException e)
e.printStackTrace();
public void ejbRemove()
System.err.println("ejbRemove()");
(3)*webogic-ejb-jar.xml*
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
<!-- Generated XML! -->
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>LogBean</ejb-name>
<message-driven-descriptor>
<pool>
</pool>
<destination-jndi-name>testtopic</destination-jndi-name>
</message-driven-descriptor>
<transaction-descriptor>
</transaction-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
you have already client program ,i sent it on first time.
Thnx again ... -
Run a client-side program when using web-enabled forms(host command)
I am trying to run a local program on my windows machine when i press a button on the oracle web form SCAN[Host('C:\scktscan.exe')]. It trys to execute the program on the server machine and not the client machine. The button will work when forms are run in client-server mode. How can i get the button to access a program on the client machine when the forms are run on the web?
In order to execute a program at the client pc, you must implement a java bean.
Have a look at the demos extension pack 1 (http://otn.oracle.com/sample_code/products/forms/content.html)
It explains also how to implement this in your own application. -
Running ssl client from multiple applications fails in Sap j2ee engine
There are two applications making ssl connections to third party.
At a time only one application is able to make connection while other
throws error message <b>"No trusted certificate found".</b>
Currently we have two j2ee applications running in SAP j2ee server. Both applications makes ssl connection to third party servers. Lets call first application as A1 and second application as A2.
A1 is an internet shopping application . It makes ssl connection to third party services at two places . One is while fetching the shipping charges from UPS site.
Code Snippet:
java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.getProperties().put("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
String lo_url = new URL("https://wwwcie.ups.com/ups.app/xml/Rate");
lo_connection = (URLConnection) lo_url.openConnection();
At other place A1 connects to cybersource service using webservice +ssl for credit card authentication using cybersource API. It uses certificate in p12 format.
Code Snippet:
com.cybersource.ws.client.axis.soap.RequestMessage lo_requestMessage = new com.cybersource.ws.client.axis.soap.RequestMessage();
Properties lo_cybsProperties = new Properties();
lo_cybsProperties.setProperty("merchantId","arvato");
lo_cybsProperties.setProperty("merchantRefCode","1234")
lo_requestMessage.setMerchantID( "arvato");
lo_requestMessage.setMerchantReferenceCode( "1234" );
lo_cybsProperties.setProperty("cybersourceURL","https://ics2wstest.ic3.com/commerce/1.x/transactionProcessor");
lo_cybsProperties.setProperty("keysDir", "./WEB-INF/config");
lo_requestMessage.setBillTo(setBillToAddress(po_mdsBillingAddress) );
// add ship to address
lo_requestMessage.setShipTo(setShipToAddress(po_mdsShiToAddress));
lo_requestMessage.setPurchaseTotals( setPurchaseTotal() );
//set cc details
lo_requestMessage.setCard( setCardDetails(po_mdsCreditCard) );
Set Items and total tax calculation
lo_replyMessage = com.cybersource.ws.client.axis.soap.Client.runTransaction( lo_requestMessage, lo_cybsProperties );
A2 Application
This application connects to Motorola secured web service to fetch details of mobile hand set. It uses keystore to create ssl connection with Motorola webservice.
Code Snippet
try {
TrustManager[] trustAllCerts = new TrustManager[]{
new X509TrustManager() {
public java.security.cert.X509Certificate[] getAcceptedIssuers() {
return new java.security.cert.X509Certificate[0];
public void checkClientTrusted(java.security.cert.X509Certificate[] certs, String authType) {}
public void checkServerTrusted(
java.security.cert.X509Certificate[] certs, String authType) {
SSLContext sc = SSLContext.getInstance("SSL");
sc.init(null, trustAllCerts, new java.security.SecureRandom());
} catch (Exception e) {
e.printStackTrace();
System.setProperty("javax.net.ssl.trustStore","SapWSM.keystore");
System.setProperty("javax.net.ssl.trustStorePassword","xxxx");
System.setProperty("javax.net.ssl.keyStore","SapWSM.keystore");
System.setProperty("javax.net.ssl.keyStorePassword","xxxx");
Problem Cases :
Case 1
Step 1 : Server starts
Step 2 : User access A1 first
Step3: A1 Connects to UPS using https (It is able to connect)
Step4: A1 connects to cybersource using webservice+ssl (It is able to connect)
Step 5: Another user access A2
Step6: A2 tries connection to Motorola webservice over ssl
Result connectivity fails with description "No trusted certificate found".
Case2
Step 1 : Server starts
Step 2 : User access A2 first
Step3: A2 tries connection to Motorola webservice over ssl (It is able to connect)
Step 5: Another user access A1
Step6: A1 connects to cybersource using webservice+ssl
Result connectivity fails with description "No trusted certificate found".
Case3
Step 1 : Server starts
Step 2 : User access A2 first
Step3: A2 tries connection to Motorola webservice over ssl (It is able to connect)
Step 5: Another user access A1
Step6: A1 connects to UPS using ssl
Result connectivity fails with description "No trusted certificate found".Hi Please answer my query it is really <b>
urgen
t</b> and we are not able to run both the applications in same server -
Running jms client and server on different machines
Hi (again) ,
I would like to know how to make a client jms application talking to a jms server on another machine, if someone could point out some tutorial that talks about it that would be good as well.
Is it necessary to have jms servers on both machines to make it possible?
Thanks in advance!In a very simplistic light...
You can set these properties when you create your initial context.
In the following code sample I'm using a Weblogic JMS Server which is running on machine A, port 9179:
Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
props.put(Context.PROVIDER_URL, "t3://machineA:9179");
InitialContext ctx = new InitialContext(props);
There are other ways of setting these properties such as using a properties file
hope this helps! -
Run report from Backend BI system using Bex analyzer
Dear All,
End user (GM) is having access to 5 queries (reports). Right now end user is accessing reports via enterprise portal system. Now requirement has come that end user will login to BI backend system and he should see the query names in his Role/User menu then he will double click on query name and it will point to Bex analyzer.
So end user will see reports via Bex analyser using backend system.
in backend BI system, in end user's pfcg role, i added role menu as BW report ID, it is showing in end users's user menu, but when he click on that..it is pointing to Bex analyzer but not opening report. Then again end user has to type query name there and execute...
please advise how end user can see all query names in his role menu's ?
Edited by: Imran Mulani on Aug 23, 2008 1:56 PM
Edited by: Imran Mulani on Aug 23, 2008 1:57 PMHi
Why dont you create and save the workbook per query in his role?
Regards,
BVC -
Transport to multiple systems using one package
My customer has one development instance that services two test and production landscapes for seperate geographical regions. This is a new installation and they are developing using packages. They currently belive that they can transport the objects from those packages to each landscape via the same package, transport layer and transport route. I'm contending that that is not possible and that they will have to create a seperate package with the same objects for each landscape if they want to transport to both. I'm a bit inexperienced at this and could use any advice available. Is it possible to setup STMS transport routes to transport to two seperate environments from the same transport layer?
Regards.Hi Joe,
One thing that you can do is to ask you Basis people to provide the Data and CO files for your transport request
You can then send these files via mail, CD etc to any number of locations and import it into the system -
How to set JMS clients to use JVM Invocation layer
Hi,
I'm not sure if this JBoss specific (but I'm assuming it's not) so I'll be asking it here. How can I set my JMS clients and Message-Driven Beans to use JVM Invocation layer since the clients and queues will reside in the same JVM.
Thanks in advance.May be that explains why I couldn't successfully integrate ActiveMQ with JBoss. I was using the 3.0 version. I'll try again once I find the time.
Anyway, do you know how to set JBoss JMS clients and MDBs to use JVM invocation or transport layer instead of UIL2?
I'm not sure if what I've done is correct But here's what I've done.
For jvm-il-service.xml, I changed the JNDI reference from "ConnectionFactory" to "JVMILConnectionFactory" since the default service uses "ConnectionFactory". Then I used that reference as my JNDI look up in my JMS client. I'm just not sure how to do this with MDBs. I think I should add an entry in the ejb descriptor file but I need someone to confirm.
Thanks. -
How to configure TMS landscape using three clients of same system?
Hi All,
I have to design a prototype for linking satellite systems to Solution Manager. To work on the Change Request Management module of Solution Manager.
Here, I need a Development - Quality - Production landscape to be configured to link it to Solution Manager, but I have only one system available to do this.
I have the clients 410, 420 and 430 in the system XYZ. Now, how do I simulate the three system landscape in STMS for the three clients mentioned above.
I tried using many attempts, but it is not working out. I could figure it out that this is possible by activating "extended transport control" parameter for each system, in STMS.
Also, there are some specific needs to configure this landscape for linking to Solution Manager, the comments are shown below:
"Transports are supported in the standard transport layer of each client. When you configure transport routes, note that only consolidation routes that are assigned to the standard transport layer of the relevant exporting client are taken into consideration. For each exporting client, exactly one target client and one target group are permitted.
We recommend that you assign exactly one development system to a production system, and that these two systems are connected by exactly one unique transport track.
If a development system and a production system are connected by more than one transport track, this may lead to inconsistencies within the transport distribution.
This type of transport configuration cannot be supported by Change Request Management, and may cause inconsistencies within the tools involved."
Please suggest me, as how to proceed to configure STMS for the same.
Thanks in advance.
Anil Santhapuri
Message was edited by: Anil SanthapuriHi Anil,
Can you please share how you could setup the 3 system landscape with diferent clients on one system using Target Groups?
Thanks,
Poorna -
ALE-Idoc -Is It possible to distribute Trnsaction data to multiple system ?
Hi Guys,
Is it possible to distribute transactional data to multiple system using ALE?
If yes ,How ?
Will u pls guide me?
RegardsHello,
This is perfectly possible when you use a distribution model for your message types in BD64.
Per message type you can indicate multiple destination systems in BD64.
Of course you need to maintain all the partner profiles.
More on the SAP help pages:
[http://help.sap.com/saphelp_erp2005/helpdata/EN/0b/2a610f507d11d18ee90000e8366fc2/frameset.htm|http://help.sap.com/saphelp_erp2005/helpdata/EN/0b/2a610f507d11d18ee90000e8366fc2/frameset.htm]
Wim -
i have written code for the following.
*Remote Interface
*Home Interface
*Stateless SessionBean
*Client Program
how do i run the client program. Im using a jboss application server. what files should be kept in which folder to run the program...Verify if the connect.properties match your deployment mode viz Local, EJB or Oracle8i.
Uday
Maybe you are looking for
-
Using TS 2.0 and LV 8.6 with Runtime Engine
Hi All, I just got a project to use an old version of TS and a new version of LV. Can I use LV 8.6 VIs that are not built in TS 2.0 using only the 8.6 RT Engine? I have installed all of TS 2.0 and the LV 8.6 RTE, but it does not run and it generates
-
Check Condition when to create Project
Dear expert! Now, I'm getting some issue about Checking condition when to create project. - When I create a project with coding mask '-XXXX-00-00-00-00-000' I want company code to have value 1000. If I enter another company code then the system will
-
I am having a problem with my feed now...I have tried to fix it but, feedvalidator keeps saying its wrong..can someone help fix it...please heres the link: http://feedvalidator.org/check.cgi?url=http%3A//thehotspotshow.com/hotspot.xml
-
Raw file support in Aperture 3.2.2
Have recently purchased a Fujifilm EXR 600 compact camera. It can capture jpeg and RAW, but Aperture does not seem to recognise the RAW format - "Unsupported Image format"; neither does iPhoto recognise RAW. Is there any way to access and process the
-
When the pages of my website load in IE7 the activity circle on the tabs does not go away even though the pages are done loading. Sample Please advise.