Tags » Java EE

The DevOps World:Docker - Apache Mesos - Apache Marathon and the Zookeeper

Introduction

Nowadays the world of the Cloud comes more and more closer to the everyday life of the developers. In my new job I was tasked with the design of a cloud solution. 1,203 more words

Programming

Do you really understand @WebService ?

SOAP web services are not cutting edge technology by any means – although it still has it’s place, REST based web services are offering tough competition. 785 more words

Java

How to Receive a Message from an Apache ActiveMQ Topic with Jekejeke Prolog

W/o Durability

foreign(create_connection_factory/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnectionFactory),

foreign(create_connection/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnection('Object')),

foreign(create_session/4, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createSession('Object', 'String', 'Integer')),

foreign(create_queue/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createQueue('Object', 'String')),

foreign(create_consumer/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConsumer('Object', 'Object')),

foreign(start_connection/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', startConnection('Object')),

foreign(receive_message/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', receiveMessage('Object')),

foreign(print_message/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', printMessage('Object')),

foreign(close_connection/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', closeConnection('Object')),

create_connection_factory(ConnFactory),

create_connection(ConnFactory, Conn),

create_session(Conn, 'false', 1, Sess),

create_queue(Sess, 'SampleTopic', Dest),

create_consumer(Sess, Dest, Cons),

start_connection(Conn),

receive_message(Cons, Msg),

print_message(Msg),

close_connection(Conn). 163 more words
Software

How to Receive a Message from an Apache ActiveMQ Queue with Jekejeke Prolog

foreign(create_connection_factory/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnectionFactory),

foreign(create_connection/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnection('Object')),

foreign(create_session/4, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createSession('Object', 'String', 'Integer')),

foreign(create_queue/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createQueue('Object', 'String')),

foreign(create_consumer/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConsumer('Object', 'Object')),

foreign(start_connection/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', startConnection('Object')),

foreign(receive_message/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', receiveMessage('Object')),

foreign(print_message/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', printMessage('Object')),

foreign(close_connection/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', closeConnection('Object')),

create_connection_factory(ConnFactory),

create_connection(ConnFactory, Conn),

create_session(Conn, 'false', 1, Sess),

create_queue(Sess, 'SampleQueue', Dest),

create_consumer(Sess, Dest, Cons),

start_connection(Conn),

receive_message(Cons, Msg),

print_message(Msg),

close_connection(Conn).
Software

How to Send a Message to an Apache ActiveMQ Topic with Jekejeke Prolog

foreign(create_connection_factory/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnectionFactory),

foreign(create_connection/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnection('Object')),

foreign(create_session/4, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createSession('Object', 'String', 'Integer')),

foreign(crete_topic/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createTopic('Object', 'String')),

foreign(create_producer/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createProducer('Object', 'Object')),

foreign(create_text_message/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createTextMessage('Object', 'String')),

foreign(send_message/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', sendMessage('Object', 'Object')),

foreign(close_connection/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', closeConnection('Object')),

create_connection_factory(ConnFactory),

create_connection(ConnFactory, Conn),

create_session(Conn, 'false', 1, Sess),

create_topic(Sess, 'SampleTopic', Dest),

create_producer(Sess, Dest, Prod),

create_text_message(Sess, 'Simples Assim', Msg),

send_message(Prod, Msg),

close_connection(Conn).
Software

How to Send a Message to an Apache ActiveMQ Queue with Jekejeke Prolog

foreign(create_connection_factory/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnectionFactory),

foreign(create_connection/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createConnection('Object')),

foreign(create_session/4, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createSession('Object', 'String', 'Integer')),

foreign(create_queue/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createQueue('Object', 'String')),

foreign(create_producer/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createProducer('Object', 'Object')),

foreign(create_text_message/3, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', createTextMessage('Object', 'String')),

foreign(send_message/2, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', sendMessage('Object', 'Object')),

foreign(close_connection/1, 'br.eti.fernandoribeiro.jekpro.activemq.ActiveMQLibrary', closeConnection('Object')),

create_connection_factory(ConnFactory),

create_connection(ConnFactory, Conn),

create_session(Conn, 'false', 1, Sess),

create_queue(Sess, 'SampleQueue', Dest),

create_producer(Sess, Dest, Prod),

create_text_message(Sess, 'Simples Assim', Msg),

send_message(Prod, Msg),

close_connection(Conn).
Software

JSF2

Do stworzenia interfejsu użytkownika posłużymy się framework’iem JSF. Wykorzystamy najnowszą aktualnie wersję JSF dostępną na stronie maven czyli 2.2.9

<!-- JSF -->
<dependency>
    <groupId>com.sun.faces</groupId>
    <artifactId>jsf-api</artifactId>
    <version>${jsf.version}</version>
</dependency>
<dependency>
   <groupId>com.sun.faces</groupId>
   <artifactId>jsf-impl</artifactId>
   <version>${jsf.version}</version>
</dependency>

<!-- The JavaServer Pages Standard Tag Library (JSTL) is a collection of useful JSP tags which encapsulates core functionality common to many JSP applications -->
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
</dependency>
<dependency>
    <groupId>javax.servlet.jsp</groupId>
    <artifactId>jsp-api</artifactId>
    <version>2.1</version>
</dependency>
 
<!-- Expression Language -->
<dependency>
   <groupId>javax.el</groupId>
   <artifactId>javax.el-api</artifactId>
   <version>3.0.0</version>
</dependency>
 
<!-- for Tomcat  -->
<dependency>
    <groupId>com.sun.el</groupId>
    <artifactId>el-ri</artifactId>
    <version>1.0</version>
</dependency>
Java EE