FaceYourManga a site where we can create our own avatar in manga style in a few steps through the flash. There are many possible combinations which sbizzarirsi and almost come to a realistic representation of themselves.
fun to create your avatar.
fun to create your avatar.
private void inviaMessaggio (String message) {
/ / First declare Connection, Session and MessageProducer of javax.jms.
Connection conn = null;
Session session = null;
MessageProducer mp = null;
try {/ / Get the InitialContext
InitialContext context = new InitialContext ();
/ / do the lookup of the ConnectionFactory by jndi
ConnectionFactory cf = (ConnectionFactory) contesto.lookup ("JMS / NOSTRACF");
/ / do the lookup via JNDI Destination Queue
Destination destination = (Destination) contesto.lookup ("JMS / NOSTRACODA) ;
/ / Create a connection from the Factory Connection conn =
cf.createConnection ();
/ / Create the session from the connection
conn.createSession session = (false, Session.AUTO_ACKNOWLEDGE)
/ / Create the producer passing as a parameter to our destination
session.createProducer mp = (target);
/ / Create message TextMessage message =
session.createTextMessage ();
/ / Put the message text
message.setText (message);
/ / Set the message destination
message.setJMSDestination (target);
/ / Set the mode on delivery (NON_PERSISTENT means that the message will be read only by an individual consumer and then deleted from the queue)
mp.setDeliveryMode (DeliveryMode.NON_PERSISTENT)
/ / Sending Message
mp.send (message);
System.out.println ("Message Sent! !!!");
} catch (Exception e) {
System.out.println ("Message Exception !!!!"+ e.getMessage ());
} finally {if (conn! = null) try { {
Session.close ();
mp.close ();
conn.Close ();
} catch (Exception e1) {
e1.printStackTrace ();}
}}}
private String leggiCoda (ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) {
/ / First, declare Connection, and Session of MessageConsumer javax.jms
Connection conn = null;
Session session = null;
MessageConsumer mc = null;
try {/ / Get the InitialContext
InitialContext context = new InitialContext ();
/ / do the lookup of the ConnectionFactory via JNDI
ConnectionFactory cf = (ConnectionFactory) contesto.lookup ("JMS / NOSTRACF" )
/ / do the lookup via JNDI Destination Queue
Destination destination = (Destination) contesto.lookup ("JMS / NOSTRACODA");
/ / Create a connection from the Connection Factory
cf.createConnection conn = ( )
/ / Create the session from the connection
conn.createSession session = (false, Session.AUTO_ACKNOWLEDGE)
/ / Creo parameter passing to the consumer as our destination
session.createConsumer mc = (target);
/ / Open the connection
conn.start ();
/ / Create a while loop to listen for messages in the queue
TextMessage message = null;
while (true) {Message m =
mc.receive (1);
/ / If there is a message we return the text.
if (m! = Null) {
message = (TextMessage) m;
System.out.println ("Message Received !!!!");
message.getText return ();}
}
} catch (Exception e) {
System.out.println ("Message Exception !!!!"+ e.getMessage ());} finally {
if (conn! = null) {try {
Session.close ();
mc.close ();
conn.Close ();
} catch (Exception e1) {
e1.printStackTrace ();}
}}
return null;}