Tags » Java EE

EJB 3.x : Lifecycle and Concurrency models (part 2)

This is the second post of the two part series. The first part covered the life cycle and the concurrency behavior of Stateful and Stateless EJBs. 1,200 more words

Java

Maven Multi-Module Structure for Enterprise Java Projects (Best Practices)

Many times, I am trying to resolve several basic or complex Maven /  Java EE  project structure issues, on my day work. In order to provide the solutions,  I often end up experimenting with the project structure and it’s effectiveness. 563 more words

Java

Analysing the performance degradation/improvements of a Java EE application with interceptors

When you are developing a Java EE application with certain performance requirements, you have to verify that these requirements are fulfilled before each release. An Hudson job that nightly executes a bunch of test measurements on some specific hardware platform is what you may think about. 639 more words

Java

How to Receive a Message from an Apache ActiveMQ Topic with Tcl/Java

W/o Durability

package require java

java::import javax.jms.Connection
java::import javax.jms.ConnectionFactory
java::import javax.jms.Destination
java::import javax.jms.Message
java::import javax.jms.MessageProducer
java::import javax.jms.Session
 
java::import org.apache.activemq.ActiveMQConnectionFactory
 
set connFactory 
 
set conn [$connFactory createConnection]
 
set sess [$conn createSession false ]

set dest [$sess createTopic SampleTopic]
 
set cons [$sess createConsumer $dest]

$conn start

set msg [$cons receive]
 
puts $msg
 
$conn close… 96 more words
Software

How to Receive a Message from an Apache ActiveMQ Queue with Tcl/Java

package require java

java::import javax.jms.Connection
java::import javax.jms.ConnectionFactory
java::import javax.jms.Destination
java::import javax.jms.Message
java::import javax.jms.MessageProducer
java::import javax.jms.Session
 
java::import org.apache.activemq.ActiveMQConnectionFactory
 
set connFactory 
 
set conn [$connFactory createConnection]
 
set sess [$conn createSession false ]

set dest [$sess createQueue SampleQueue]
 
set cons [$sess createConsumer $dest]

$conn start

set msg [$cons receive]
 
puts $msg
 
$conn close 10 more words
Software

How to Send a Message to an Apache ActiveMQ Topic with Tcl/Java

package require java

java::import javax.jms.Connection
java::import javax.jms.ConnectionFactory
java::import javax.jms.Destination
java::import javax.jms.Message
java::import javax.jms.MessageProducer
java::import javax.jms.Session
 
java::import org.apache.activemq.ActiveMQConnectionFactory
 
set connFactory 
 
set conn [$connFactory createConnection]
 
set sess [$conn createSession false ]

set dest [$sess createTopic SampleTopic]
 
set prod [$sess createProducer $dest]
 
set msg [$sess createTextMessage Simples Assim]
 
$prod send $msg
 
$conn close 10 more words
Software

How to Send a Message to an Apache ActiveMQ Queue with Tcl/Java

package require java

java::import javax.jms.Connection
java::import javax.jms.ConnectionFactory
java::import javax.jms.Destination
java::import javax.jms.Message
java::import javax.jms.MessageProducer
java::import javax.jms.Session
 
java::import org.apache.activemq.ActiveMQConnectionFactory
 
set connFactory 
 
set conn [$connFactory createConnection]
 
set sess [$conn createSession false ]

set dest [$sess createQueue SampleQueue]
 
set prod [$sess createProducer $dest]
 
set msg [$sess createTextMessage Simples Assim]
 
$prod send $msg
 
$conn close 10 more words
Software