Ronald Heukers

Ranch Hand
+ Follow
since Jul 20, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ronald Heukers

Thanks.
11 years ago
JSF
@Bert: And what is the result of the meeting of 27th april?

regards,

Ronald Heukers
11 years ago
JSF
Hi all,

We come in our compony definitely to the limits of JSF RI and we start needing more components which are available in Myfaces (with Tobago and Tomahawk) or ADF Faces (Trinidad).

We are a little bit in doubt which of the two to choose.

Which one can you people advice regarding criteria like ease of use, maintainability, number of components, being a standard, market support etc.

regards,

Ronald Heukers
11 years ago
JSF
I have to say I am a little bit out of this topic the last time but maybe this helps some:

Dan Chisholm:

http://www.danchisholm.net/oct1/topic/section1/anonymous1ans.html
see the answers on question 1 and 2. Especially answer 1 gives info.

(by the way, the questions are on:
http://www.danchisholm.net/oct1/topic/section1/anonymous1.html

regards,

Ronald
Hello all,

We are doing at the moment in our company succesful Web Services projects with JWDSP 1.6. We want to migrate however to JAX-WS when our application server (Oracle) supports fully Java EE 5. (Everyone in the JavaOne 2006 was lyrical about JAX-WS) and our little experiments are also hopeful.

My question is what direction is Axis going? I know very little about Axis. Will it also conform to JAX-WS or is it going an own direction (that is what I heard).

Which will be in the future most likely be the standard: JAX-WS (with the new version of JWSDP) or Axis?

Thanks in advance,

regards,

Ronald Heukers
11 years ago
Hello all,

Which version of Oracle IAS (application server) fully supports Java EE 5? We urgently want to use the web-services possibilities (JAX-WS) of Java EE 5, but ii is not clear whch version of IAS supports this.

regards

Ronald
12 years ago
Hi,

I do not know assent, but am very happy with checkstyle which we use here and could recommend it.
We have it working calling it form an ant script file, but a colleage of mine has it also working as an eclipse plug-in and seems to be happy with it.

Success!!

Ronald
For me goes everything fine too.
12 years ago
JSP
Hello all,

Can anybody tell me how to see with which version of the jdk a certain class is compiled. I suppose this must be possible. We need to see this for one of our applications to troubleshoot a problem. Thanks in advance,

regards,

Ronald
12 years ago
I would like to underline the response of Rathi.

I agree with him. The head first servlets and JSP book from Bates/Sierra will help you a lot.

regards,

Ronald
12 years ago
Hello all,

I am pretty experienced in java but very new on webservices so if I ask a stupid question forgive me please and do not be hard on me.

The question I have is the following:

We got from a customer of us the wsdl files in a web-service situation where uddi is not used. It is easy for me to generate a soap client. Is it possible to obtain online more information about what each procedure and parameter in the wsdl (defined in the types, means or do I need the design of the web-service for that. Our customer did not give us that yet.

e.g suppose that the porttype give us a class with an operation as a method, I would like more info about what that method does and even more how the return value (his out message, that I get back) must be interpreted.

regards,

Ronald
12 years ago
Hi Emanuel,

ok 2 sourcecode of files SenderToQueue.java and SampleUtilities.java on the end of this message:

Starting the main in SenderToQueue.java with 2 arguments while running,
gives the error

JNDI 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

I have played a liitle with that by setting some initial factory or playing with the jms.xml but I am newby on jms, all I want is some working jms code to do a starting evaluation.

regards,

Ronald

/*
* @(#)SenderToQueue.java1.2 00/08/18
*
* Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved.
*
* Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
* modify and redistribute this software in source and binary code form,
* provided that i) this copyright notice and license appear on all copies of
* the software; and ii) Licensee does not utilize the software in a manner
* which is disparaging to Sun.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
* IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
* LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
* INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
* CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
* OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* This software is not designed or intended for use in on-line control of
* aircraft, air traffic, aircraft navigation or aircraft communications; or in
* the design, construction, operation or maintenance of any nuclear
* facility. Licensee represents and warrants that it will not use or
* redistribute the Software for such purposes.
*/
import javax.jms.*;

/**
* The SenderToQueue class consists only of a main method, which sends
* several messages to a queue.
* <p>
* Run this program in conjunction with either SynchQueueReceiver or
* AsynchQueueReceiver. Specify a queue name on the command line when you run
* the program. By default, the program sends one message. Specify a number
* after the queue name to send that number of messages.
*
* @author Kim Haase
* @version 1.2, 08/18/00
*/
public class SenderToQueue {

/**
* Main method.
*
* @param argsthe queue used by the example and, optionally, the
* number of messages to send
*/
public static void main(String[] args) {
String queueName = null;
QueueConnectionFactory queueConnectionFactory = null;
QueueConnection queueConnection = null;
QueueSession queueSession = null;
Queue queue = null;
QueueSender queueSender = null;
TextMessage message = null;
final int NUM_MSGS;
final String MSG_TEXT = new String("Here is a message");
int exitResult = 0;

if ( (args.length < 1) || (args.length > 2) ) {
System.out.println("Usage: java SenderToQueue <queue_name> [<number_of_messages>]");
System.exit(1);
}
queueName = new String(args[0]);
System.out.println("Queue name is " + queueName);
if (args.length == 2){
NUM_MSGS = (new Integer(args[1])).intValue();
} else {
NUM_MSGS = 1;
}

try {
queueConnectionFactory =
SampleUtilities.getQueueConnectionFactory();
queueConnection =
queueConnectionFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
queue = SampleUtilities.getQueue(queueName, queueSession);
} catch (Exception e) {
System.out.println("Connection problem: " + e.toString());
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException ee) {}
}
System.exit(1);
}

/*
* Create sender.
* Create text message.
* Send five messages, varying text slightly.
* Send end-of-messages message.
* Finally, close connection.
*/
try {
queueSender = queueSession.createSender(queue);
message = queueSession.createTextMessage();
for (int i = 0; i < NUM_MSGS; i++) {
message.setText(MSG_TEXT + " " + (i + 1));
System.out.println("Sending message: " + message.getText());
queueSender.send(message);
}

// Send a non-text control message indicating end of messages.
queueSender.send(queueSession.createMessage());
} catch (JMSException e) {
System.out.println("Exception occurred: " + e.toString());
exitResult = 1;
} finally {
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException e) {
exitResult = 1;
}
}
}
SampleUtilities.exit(exitResult);
}
}


--------------------------

/*
* @(#)SampleUtilities.java1.7 00/08/18
*
* Copyright (c) 2000 Sun Microsystems, Inc. All Rights Reserved.
*
* Sun grants you ("Licensee") a non-exclusive, royalty free, license to use,
* modify and redistribute this software in source and binary code form,
* provided that i) this copyright notice and license appear on all copies of
* the software; and ii) Licensee does not utilize the software in a manner
* which is disparaging to Sun.
*
* This software is provided "AS IS," without a warranty of any kind. ALL
* EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
* IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
* OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
* LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
* INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
* CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
* OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*
* This software is not designed or intended for use in on-line control of
* aircraft, air traffic, aircraft navigation or aircraft communications; or in
* the design, construction, operation or maintenance of any nuclear
* facility. Licensee represents and warrants that it will not use or
* redistribute the Software for such purposes.
*/
import javax.naming.*;
import javax.jms.*;

/**
* Utility class for JMS sample programs.
* <p>
* Set the <code>USE_JNDI</code> variable to true or false depending on whether
* your provider uses JNDI.
* <p>
* Contains the following methods:
* <ul>
* <li> getQueueConnectionFactory
* <li> getTopicConnectionFactory
* <li> getQueue
* <li> getTopic
* <li> jndiLookup
* <li> exit
* <li> receiveSynchronizeMessages
* <li> sendSynchronizeMessages
* </ul>
*
* Also contains the class DoneLatch, which contains the following methods:
* <ul>
* <li> waitTillDone
* <li> allDone
* </ul>
*
* @author Kim Haase
* @author Joseph Fialli
* @version 1.7, 08/18/00
*/
public class SampleUtilities {
public static final boolean USE_JNDI = true;
public static final String QUEUECONFAC = "QueueConnectionFactory";
public static final String TOPICCONFAC = "TopicConnectionFactory";
private static Context jndiContext = null;

/**
* Returns a QueueConnectionFactory object.
* If provider uses JNDI, serves as a wrapper around jndiLookup method.
* If provider does not use JNDI, substitute provider-specific code here.
*
* @returna QueueConnectionFactory object
* @throwsjavax.naming.NamingException (or other exception)
* if name cannot be found
*/
public static javax.jms.QueueConnectionFactory getQueueConnectionFactory()
throws Exception {
if (USE_JNDI) {
return (javax.jms.QueueConnectionFactory) jndiLookup(QUEUECONFAC);
} else {
// return new provider-specific QueueConnectionFactory
return null;
}
}

/**
* Returns a TopicConnectionFactory object.
* If provider uses JNDI, serves as a wrapper around jndiLookup method.
* If provider does not use JNDI, substitute provider-specific code here.
*
* @returna TopicConnectionFactory object
* @throwsjavax.naming.NamingException (or other exception)
* if name cannot be found
*/
public static javax.jms.TopicConnectionFactory getTopicConnectionFactory()
throws Exception {
if (USE_JNDI) {
return (javax.jms.TopicConnectionFactory) jndiLookup(TOPICCONFAC);
} else {
// return new provider-specific TopicConnectionFactory
return null;
}
}

/**
* Returns a Queue object.
* If provider uses JNDI, serves as a wrapper around jndiLookup method.
* If provider does not use JNDI, substitute provider-specific code here.
*
* @param name String specifying queue name
* @param session a QueueSession object
*
* @returna Queue object
* @throwsjavax.naming.NamingException (or other exception)
* if name cannot be found
*/
public static javax.jms.Queue getQueue(String name,
javax.jms.QueueSession session)
throws Exception {
if (USE_JNDI) {
return (javax.jms.Queue) jndiLookup(name);
} else {
return session.createQueue(name);
}
}

/**
* Returns a Topic object.
* If provider uses JNDI, serves as a wrapper around jndiLookup method.
* If provider does not use JNDI, substitute provider-specific code here.
*
* @param name String specifying topic name
* @param session a TopicSession object
*
* @returna Topic object
* @throwsjavax.naming.NamingException (or other exception)
* if name cannot be found
*/
public static javax.jms.Topic getTopic(String name,
javax.jms.TopicSession session)
throws Exception {
if (USE_JNDI) {
return (javax.jms.Topic) jndiLookup(name);
} else {
return session.createTopic(name);
}
}

/**
* Creates a JNDI InitialContext object if none exists yet. Then looks up
* the string argument and returns the associated object.
*
* @param namethe name of the object to be looked up
*
* @returnthe object bound to <code>name</code>
* @throwsjavax.naming.NamingException if name cannot be found
*/
public static Object jndiLookup(String name) throws NamingException {
Object obj = null;

if (jndiContext == null) {
try {
jndiContext = new InitialContext();
} catch (NamingException e) {
System.out.println("Could not create JNDI context: " +
e.toString());
throw e;
}
}
try {
obj = jndiContext.lookup(name);
} catch (NamingException e) {
System.out.println("JNDI lookup failed: " + e.toString());
throw e;
}
return obj;
}

/**
* Calls System.exit().
*
* @param resultThe exit result; 0 indicates no errors
*/
public static void exit(int result) {
System.exit(result);
}

/**
* Wait for 'count' messages on controlQueue before continuing. Called by
* a publisher to make sure that subscribers have started before it begins
* publishing messages.
* <p>
* If controlQueue doesn't exist, the method throws an exception.
*
* @param prefixprefix (publisher or subscriber) to be displayed
* @param controlQueueNamename of control queue
* @param countnumber of messages to receive
*/
public static void receiveSynchronizeMessages(String prefix,
String controlQueueName,
int count)
throws Exception {
QueueConnectionFactory queueConnectionFactory = null;
QueueConnection queueConnection = null;
QueueSession queueSession = null;
Queue controlQueue = null;
QueueReceiver queueReceiver = null;

try {
queueConnectionFactory =
SampleUtilities.getQueueConnectionFactory();
queueConnection = queueConnectionFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
controlQueue = getQueue(controlQueueName, queueSession);
queueConnection.start();
} catch (Exception e) {
System.out.println("Connection problem: " + e.toString());
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException ee) {}
}
throw e;
}

try {
System.out.println(prefix + "Receiving synchronize messages from "
+ controlQueueName + "; count = " + count);
queueReceiver = queueSession.createReceiver(controlQueue);
while (count > 0) {
queueReceiver.receive();
count--;
System.out.println(prefix
+ "Received synchronize message; expect "
+ count + " more");
}
} catch (JMSException e) {
System.out.println("Exception occurred: " + e.toString());
throw e;
} finally {
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException e) {}
}
}
}

/**
* Send a message to controlQueue. Called by a subscriber to notify a
* publisher that it is ready to receive messages.
* <p>
* If controlQueue doesn't exist, the method throws an exception.
*
* @param prefixprefix (publisher or subscriber) to be displayed
* @param controlQueueNamename of control queue
*/
public static void sendSynchronizeMessage(String prefix,
String controlQueueName)
throws Exception {
QueueConnectionFactory queueConnectionFactory = null;
QueueConnection queueConnection = null;
QueueSession queueSession = null;
Queue controlQueue = null;
QueueSender queueSender = null;
TextMessage message = null;

try {
queueConnectionFactory =
SampleUtilities.getQueueConnectionFactory();
queueConnection = queueConnectionFactory.createQueueConnection();
queueSession = queueConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
controlQueue = getQueue(controlQueueName, queueSession);
} catch (Exception e) {
System.out.println("Connection problem: " + e.toString());
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException ee) {}
}
throw e;
}

try {
queueSender = queueSession.createSender(controlQueue);
message = queueSession.createTextMessage();
message.setText("synchronize");
System.out.println(prefix + "Sending synchronize message to "
+ controlQueueName);
queueSender.send(message);
} catch (JMSException e) {
System.out.println("Exception occurred: " + e.toString());
throw e;
} finally {
if (queueConnection != null) {
try {
queueConnection.close();
} catch (JMSException e) {}
}
}
}

/**
* Monitor class for asynchronous examples. Producer signals end of
* message stream; listener calls allDone() to notify consumer that the
* signal has arrived, while consumer calls waitTillDone() to wait for this
* notification.
*
* @author Joseph Fialli
* @version 1.7, 08/18/00
*/
static public class DoneLatch {
boolean done = false;

/**
* Waits until done is set to true.
*/
public void waitTillDone() {
synchronized (this) {
while (! done) {
try {
this.wait();
} catch (InterruptedException ie) {}
}
}
}

/**
* Sets done to true.
*/
public void allDone() {
synchronized (this) {
done = true;
this.notify();
}
}
}
}
Hello Alex,

The Head First series is regarding this subject one of the best books I have ever seen.

regards,

Ronald
12 years ago
Rajesh,

On many loadbalancers you can put the option of session binding on for different ports. That means that a session will always go to the same server where he started. We have enabled this option for our applications and it saves us a lot of troubles with sessions.

regards,

Ronald
12 years ago