Showing posts with label jboss. Show all posts
Showing posts with label jboss. Show all posts

Thursday, February 14, 2008

Understanding JBoss Seam

We are currently working in a project using JBoss Seam extensively. The interesting and key feature of JBoss Seam is conversations. Conversation combined with bi-jection feature of Seam, just makes state management in web applications slicker and clean.


 


On the first look you may think that seam just provides one more scope (like REQUEST, SESSION, etc) for state management. But it provides a lot more. If you really want to see how conversations can fix some common issues with web applications (like. back buttoning) I would highly recommend this blog of Jacob Orshalick.


 


Jacob is also co-authoring the second edition of JBoss Seam: Simplicity and Power Beyond JavaEE with Michael Yuan. The second edition of their book will be released out this year.


 


 Recently preview of some of the chapters of this upcoming book is released. Even if you are already using Seam in your projects, definitely you will find this book more insightful.


 


So better understand your conversations, before you are timed-out!


 


 

Sunday, January 20, 2008

listening on 0.0.0.0

After you start your Tomacat/Apache HTTPD Server:

just go to the command line and use netstat -an command to check the network statistics. You might have noticed
foobar:~ nrs$ netstat -an | grep LISTEN
tcp46 0 0 *.8080 *.* LISTEN
tcp4 0 0 192.168.2.101.3873 *.* LISTEN

that the listening port is listed as either *.8080 or 0.0.0.0:8080.

Basically this means that your server is listening for connection from all the network interfaces in your machine. i.e. if you have Wi-Fi, ethernet or couple of other VirtualMachine ethernet port configured. Then you can reach the server using any of those interfaces (IP address).

You could reach the server using 127.0.0.1 (local host), and any IP address of one of the network interfaces you have. So even when you write socket programming code, use the server host address as 0.0.0.0 if you want that your server to be reachable through all the interfaces.

You could also use the same feature to gain precise control of how your application can be reached. When you start the server in production or other critical environments it just be better that the server listens only in single IP address that is the expected interface for reaching the service.

In JBoss application server you can control this attribute either in the configuration file, or through system property jboss.bind.address. This property can also have multiple values separated by comma (i.e. jboss.bind.address=127.0.0.0,232.213.232.12). This helps to control precisely through which interface your service were accessible.
C:\jboss-home\bin>.\run.bat -Djboss.bind.address=0.0.0.0 -c default

Recommended Blog Posts