<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7366383521125025236</id><updated>2012-01-16T01:47:20.735-08:00</updated><category term='Application Server'/><category term='Installer for Java applications'/><category term='JBoss'/><category term='PostgreSQL'/><category term='IZPack'/><category term='JSF Tutorial'/><category term='Cygwin'/><category term='Database'/><category term='InstallAnywhere'/><title type='text'>Tech-Tack-Talk</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-4639437840217914066</id><published>2012-01-16T01:19:00.000-08:00</published><updated>2012-01-16T01:47:20.743-08:00</updated><title type='text'>EJB3: Good to know details</title><content type='html'>&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #660000; font-family: Arial, Helvetica, sans-serif; font-size: large;"&gt;&lt;b&gt;Message Driven Bean&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;b&gt;* Important EJB and JMS import files when creating MDB&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.ejb.ActivationConfigProperty;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.ejb.MessageDriven;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jms.Message;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jms.MessageListener;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;import javax.jms.ObjectMessage;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;&lt;b&gt;* How to create an MDB class?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt;- use the &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace; font-size: small;"&gt;&lt;b&gt;@MessageDriven&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif; font-size: small;"&gt; annotation&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;@MessageDriven(activationConfig = {&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/OrderBillingQueue"),&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;nbsp; @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;public class OrderBillingMDB implements MessageListener {&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif;"&gt;*How to send a message for a particular MDB in a particular JMS Queue?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(1) Declare a JMS resource including the message destination, by using Dependency Injection (DI) with the use of &lt;/span&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;b&gt;@Resource&lt;/b&gt;&lt;/span&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; annotation instead of being looked up.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;@Resource(name = "jms/QueueConnectionFactory")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;private ConnectionFactory connectionFActory;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;@Resource(name="jms/OrderBillingQueue")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;private Destination billingQueue;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(2) &amp;nbsp;Create a connection using ConnectionFactory Object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Connection connection = connectionFactory.createConnection();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(3) Create a session using the connection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(4) Create a MessageProducer using the session for a particular queue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;MessageProducer message = session.createMessageProducer(billingQueue);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(5) Create an ObjectMessage and set the Object that will be created as a message&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;ObjectMessage message = session.createObjectMessage();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;// assuming that order has already been&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;// instantiated and already has values.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;message.setObject(order);&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(6) Send the message via the MessageProducer Object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;producer.send(message);&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;(7) Release the JMS resources&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;producer.close();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;session.close();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;connection.close();&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;NOTE: the code snippet are enclosed in a &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;try &lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;and &lt;/span&gt;&lt;b&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;catch&lt;/span&gt;&lt;/b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt; clause&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;&lt;span style="color: blue; font-family: Arial, Helvetica, sans-serif;"&gt;* Common Error encountered in deploying Message Driven Bean (on Jboss AS)&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;INFO [EJBContainer] STARTED EJB: com.jeeconsultant.jms.SAmpleMDB ejbName: SampleMDB&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;WARN [JmsActivation] Failure in jms activation org.jboss.resource.adapter.jms.inflow.JmsActivationSpec@b7b17a(ra=org.jboss.resource.adapter.jms.JmsResourceAdapter@1af76e7 destination=queue/MyQueue destinationType=javax.jms.Queue tx=true durable=false reconnect=10 provider=java:/DefaultJMSProvider user=null maxMessages=1 minSession=1 maxSession=15 keepAlive=60000 useDLQ=true DLQHandler=org.jboss.resource.adapter.jms.inflow.dlq.GenericDLQHandler DLQJndiName=queue/DLQ DLQUser=null DLQMaxResent=5) javax.naming.NameNotFoundException: MyQueue not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Reason:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;The Queue Destination in Jboss was not defined yet.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Solution:&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;adding the following XML code-snippet to destinations-service.xml file&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;usually located at C:\jboss-5.1.0.GA\server\default\deploy\messaging&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;!-- Cluster JMS Test using MyQueue--&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;mbean code="org.jboss.jms.server.destination.QueueService"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;name="jboss.messaging.destination:service=Queue,name=SampleQueue"&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;xmbean-dd="xmdesc/Queue-xmbean.xml"&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;depends optional-attribute-name="ServerPeer"&amp;gt;jboss.messaging:service=ServerPeer&amp;lt;/depends&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;depends&amp;gt;jboss.messaging:service=PostOffice&amp;lt;/depends&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'Courier New', Courier, monospace;"&gt;&amp;lt;/mbean&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-4639437840217914066?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/4639437840217914066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=4639437840217914066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/4639437840217914066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/4639437840217914066'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2012/01/ejb3-good-to-know-details.html' title='EJB3: Good to know details'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-5646961975594929831</id><published>2012-01-16T01:13:00.000-08:00</published><updated>2012-01-16T01:44:45.005-08:00</updated><title type='text'>Web Service: Good to know details</title><content type='html'>&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;How to Generate WS classes from an existing Service (End point) ?&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;b&gt;- Use wsimport tool/command - this is shipped with JDK 1.6&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;ussage: run wsimport in command line&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="MsoNormal"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: #1f497d;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;wsimport -keep -verbose -d [directoryfor output files] [WSDL url] &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;span style="color: #1f497d;"&gt;(wsimport parameters/optionsdiscussed at &lt;/span&gt;&lt;a href="http://download.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html"&gt;http://download.oracle.com/javase/6/docs/technotes/tools/share/wsimport.html&lt;/a&gt;)&lt;/span&gt;&lt;span style="color: #1f497d;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;div style="text-align: left;"&gt;&lt;b&gt;&lt;span style="color: #1f497d;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;Example:&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="color: #1f497d;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;div style="text-align: left;"&gt;&lt;span style="color: #1f497d;"&gt;&lt;span style="font-family: Arial, Helvetica, sans-serif;"&gt;wsimport -keep -verbose -dC:\PROJECTS\Workspace\PortServices\SubscriberProfileConfigService\src &lt;a href="http://abe-wbsf-prod-01.osc.tac.net:9080/SubscriberProfileConfigurationServiceMediationWeb/sca/SubscriberProfileConfigurationServiceWSExport/WEB-INF/wsdl/SubscriberProfileConfigurationServiceWSExport_SubscriberProfileConfigurationServiceHttp_Service.wsdl"&gt;http://localhost:9080/SubscriberProfileConfigurationServiceMediationWeb/sca/SubscriberProfileConfigurationServiceWSExport/WEB-INF/wsdl/SubscriberProfileConfigurationServiceWSExport_SubscriberProfileConfigurationServiceHttp_Service.wsdl&lt;/a&gt;&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: #1f497d;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="MsoNormal"&gt;&lt;span style="color: #1f497d;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-5646961975594929831?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/5646961975594929831/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=5646961975594929831' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/5646961975594929831'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/5646961975594929831'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2012/01/web-service-good-to-know-things.html' title='Web Service: Good to know details'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-1523072450563069402</id><published>2009-05-21T03:15:00.000-07:00</published><updated>2009-06-09T19:58:03.858-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JBoss'/><category scheme='http://www.blogger.com/atom/ns#' term='Application Server'/><title type='text'>&gt;&gt; JBoss Web Server (tip-top-tips)</title><content type='html'>&lt;br&gt;&lt;br /&gt;JBoss Web Server or JBoss Web Application Server is one of the pioneering Open Source Application Servers here on earth (I just don't know if they have this at planet Crypton). JBoss started to blossom a year before I decided to end the long journey of my college life (way back 1999). JBoss has been catering to numerous web applications all throughout this planet for years now. And one good thing about it is - it's FREE! - The best things in this cyber-life are free =)&lt;br /&gt;&lt;br /&gt;Here are some tips/trivia about the bossy JBoss: &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;server.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The configuration file where we set the ports for different protocols is called &lt;span style="font-style:italic;"&gt;server.xml&lt;/span&gt;. This file is located in &lt;span style="font-style:italic;"&gt;[JBoss_Root]/server/default/deploy/jboss-web.deployer&lt;/span&gt; folder. &lt;br /&gt;&lt;br /&gt;The most widely used protocol in the World Wide Web is the Hyper-Text-Transfer-Protocol or HTTP. On the &lt;span style="font-style:italic;"&gt;server.xml&lt;/span&gt;, it is initially set to the default port used for HTTP which is 8080, but you can change this to any possible available port. See example bellow:&lt;br /&gt;&lt;br /&gt;&lt;font face="Courier New"&gt;&lt;br /&gt;         &lt; Connector port="8080" &lt;br /&gt;          address="${jboss.bind.address}"    &lt;br /&gt;          maxThreads="250" maxHttpHeaderSize="8192"&lt;br /&gt;          emptySessionPath="true" protocol="HTTP/1.1"&lt;br /&gt;          enableLookups="false" redirectPort="8443" acceptCount="100"&lt;br /&gt;          connectionTimeout="20000" disableUploadTimeout="true" /&gt;&lt;br /&gt;&lt;/font&gt;   &lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;h2&gt;This Article is a work on progress...&lt;/h2&gt;&lt;br /&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-1523072450563069402?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/1523072450563069402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=1523072450563069402' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/1523072450563069402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/1523072450563069402'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2009/05/jboss-web-server-tip-top-tips.html' title='&gt;&gt; JBoss Web Server (tip-top-tips)'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-8596601673144467616</id><published>2009-05-19T20:28:00.000-07:00</published><updated>2009-06-09T20:05:50.198-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IZPack'/><category scheme='http://www.blogger.com/atom/ns#' term='Installer for Java applications'/><category scheme='http://www.blogger.com/atom/ns#' term='InstallAnywhere'/><title type='text'>&gt;&gt; Creating an Installer for your Application</title><content type='html'>&lt;br&gt;&lt;br /&gt;There are several tools that could be used in creating an installer for your application. Some of them can be purchased and some are free (open-source).&lt;br /&gt;&lt;br /&gt;I've tried using a Licensed Installer creator called &lt;span style="font-style:italic;"&gt;InstallAnywhere&lt;/span&gt; and I also tried using an open-source called &lt;span style="font-style:italic;"&gt;IZPack&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;IZPack for me is better because of two things:&lt;br /&gt;&lt;br /&gt;1. It's totally &lt;span style="font-weight:bold;"&gt;FREE!&lt;/span&gt;&lt;br /&gt;2. It's platform independent. All it needs to run is a Java[tm] Runtime Environment.&lt;br /&gt;&lt;br /&gt;You can download IZPack &lt;a href="http://izpack.org/downloads/"&gt;here&lt;/a&gt; or you can visit the IZPack homepage &lt;a href="http://izpack.org/"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;IZPack installer comes in a &lt;span style="font-style:italic;"&gt;jar&lt;/span&gt; file (java archive) and it's name is something like &lt;span style="font-style:italic;"&gt;IzPack-install-[version-number].jar&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;IzPack uses XML files to describe installations, so if you're planning to use this tool, you should be familiar with XML (ant build files). &lt;br /&gt;&lt;br /&gt;Let's have a walk-through on the basic kung-fu of this IZPack thing...&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;- INSTALLING IZPack -&lt;/span&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;1. Ensure that you have set the JAVA_HOME and add it on the PATH/CLASSPATH&lt;br /&gt;&lt;br /&gt;&amp;nbsp;2. Open a command-line and go to the directory where the jar file is located&lt;br /&gt;&lt;br /&gt;&amp;nbsp;3. Type the following command:&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp &lt;span style="font-weight:bold;"&gt;java &amp;nbsp; -jar &amp;nbsp; [Installer name]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;[Installer name]&lt;/span&gt;, is the IZPack jar file.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;4. Follow-on the GUI (it's easy and straight-forward)&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;- COMPILING YOUR FIRST INSTALLER -&lt;/span&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&amp;nbsp; 1. You should have created an XML file (build file to describe the installation process) &lt;span style="font-style:italic;"&gt;eg. install.xml or build.xml&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;A good start to read about IZPack XML tags could be found at [IZPAck_Install_Root]/doc folder.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; 2. Open a command line and go to the /bin directory from the installed IZPack folder. &lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;You can also add the file called &lt;span style="font-weight:bold;"&gt;compile&lt;/span&gt; (from the /bin folder) to the PATH/CLASSPATH , so that you don't need to go to the /bin folder every time you want to create an installer.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; 3. Enter the following command bellow:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &lt;span style="font-weight:bold;"&gt;compile &amp;nbsp; install.xml &amp;nbsp; -b &amp;nbsp; . &amp;nbsp; -o &amp;nbsp; install.jar &amp;nbsp; -k &amp;nbsp; standard&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;The installer that you have created (install.jar) will run on any machine/operating system that has JVM.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;The compilation options for a command-line:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; -? &amp;nbsp; : &amp;nbsp; gives a list of the available options.&lt;br /&gt;&lt;br /&gt; -b &amp;nbsp; : &amp;nbsp; specifies the base path, ie the one that will be used to resolve the relative paths. If your XML file contains absolute paths, specify it to an empty string (-b "").&lt;br /&gt;&lt;br /&gt; -k &amp;nbsp; : &amp;nbsp; specifies the installer kind, for instance most users will want standard here.&lt;br /&gt;&lt;br /&gt; -o &amp;nbsp; : &amp;nbsp; specifies the resulting installer Jar file name.&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt;&lt;center&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;- RUNNING YOUR APPLICATION INSTALLER -&lt;/span&gt;&lt;br /&gt;&lt;/center&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;Just double-click the jar file (&lt;span style="font-style:italic;"&gt;install.jar&lt;/span&gt;) OR you can open a command line, go to the directory where the installer is located and type the following command:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;java &amp;nbsp; -jar &amp;nbsp; install.jar&lt;/span&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-8596601673144467616?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/8596601673144467616/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=8596601673144467616' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/8596601673144467616'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/8596601673144467616'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2009/05/creating-installer-for-your-application.html' title='&gt;&gt; Creating an Installer for your Application'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-8987394248293339055</id><published>2009-05-19T19:11:00.000-07:00</published><updated>2009-06-09T20:04:02.870-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PostgreSQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Database'/><title type='text'>&gt;&gt; PostgreSQL - one of the developer's kung-fu...</title><content type='html'>&lt;br&gt;&lt;br /&gt;In most &lt;span style="font-style:italic;"&gt;web applications&lt;/span&gt; or &lt;span style="font-style:italic;"&gt;client-server applications&lt;/span&gt; that handles data; User interface and user experience are considerably big factors. But, these should be secondary from the main concern. I believe that the most important part of any application that handles and processes data is the data itself.&lt;br /&gt; &lt;br /&gt;Developers have a wide range of choices when it comes to database applications. &lt;span style="font-style:italic;"&gt;Oracle , SQL Server and MySQL&lt;/span&gt; are some of the popular databases that are out in the market. &lt;br /&gt;&lt;br /&gt;But nowadays, &lt;span style="font-weight:bold;"&gt;PostgreSQL&lt;/span&gt; is one of the best open-source DB that a developer should consider. It's free, easy to use, portable and platform independent.&lt;br /&gt;&lt;br /&gt;You can download PostgreSQL from &lt;a href="http://www.postgresql.org/download/"&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Let's see some of the basic kung-fu of this database:&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;1. Installation process&lt;/h3&gt; &lt;br /&gt;Installing the database is very simple. You can take advantage of the graphical user interface. It's very easy and straight-forward specially for windows. For Linux, there are some simple configurations that we need to consider.&lt;br /&gt;&lt;br /&gt;Learn more about the installation process from &lt;a href="http://wiki.postgresql.org/wiki/Detailed_installation_guides"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;2. Security (Access control)&lt;/h3&gt;&lt;br /&gt;After installing the database, there is a configuration file named &lt;span style="font-style:italic;"&gt;pg_hba.conf&lt;/span&gt;. This is found on &lt;span style="font-style:italic;"&gt;[postgreSQL_root]/data&lt;/span&gt; folder for Windows; For Linux usually it's at &lt;i&gt;/var/lib/postgresql/data&lt;/i&gt;. We configure the client connection authentication in this file.&lt;br /&gt;&lt;br /&gt;Some of the common configuration options are listed bellow:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;*&lt;/span&gt;  We can set which clients can connect to one or more database.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;*&lt;/span&gt;  Allow clients to connect to a single or multiple databases using a user-name and password authentication.&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;*&lt;/span&gt; Allow clients to connect to a single or multiple databases even without a user-name and password authentications.&lt;br /&gt;&lt;br /&gt;You will see the following configuration variables in &lt;span style="font-style:italic;"&gt;pg_hba.conf&lt;/span&gt; file:&lt;br /&gt;&lt;br /&gt;TYPE: &lt;br /&gt;- &lt;span style="font-style:italic;"&gt;this refers to the connection type.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DATABASE: &lt;br /&gt;- &lt;span style="font-style:italic;"&gt;refers to a database or multiple database separated by comma.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;USER: &lt;br /&gt;- &lt;span style="font-style:italic;"&gt;refers to the user or list of users that are allowed to connect to the db.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;CIDR-ADDRESS: &lt;br /&gt;- &lt;span style="font-style:italic;"&gt;specifies the set of hosts the record matches; usually an IP address.&lt;/span&gt;  &lt;br /&gt;       &lt;br /&gt;METHOD: &lt;br /&gt;- &lt;span style="font-style:italic;"&gt;refers to the method of connection. either to accept password, trusted connection, etc.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;A synopsis can be found from the initial &lt;span style="font-style:italic;"&gt;pg_hba.conf&lt;/span&gt; file after installing PostgreSQL.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;3. Schema and Table Creation&lt;/h3&gt;&lt;br /&gt;There are two basic ways to create Schema and Tables.&lt;br /&gt;&lt;br /&gt;1. &lt;span style="font-style:italic;"&gt;PGAdmin-III&lt;/span&gt; is a good tool in creating Schema and Tables. You can also use this tool to create a database. It usually comes along  with the installer. It's very easy to use.&lt;br /&gt;&lt;br /&gt;2. SQL scripts will always be in the picture when it comes to creating schema and tables. A user must use the &lt;span style="font-weight:bold;"&gt;psql&lt;/span&gt; command to run a script directly on the command line (The sql script could be typed directly on the console or you can use a &lt;span style="font-style:italic;"&gt;.sql&lt;/span&gt; file). Bellow is an example on how to run script:&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &lt;font face="Courier New"&gt;psql databasename username &lt; filename.sql&lt;/font&gt;&lt;br /&gt;&lt;br /&gt;Note:&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;span style="font-weight:bold;"&gt;psql&lt;/span&gt; is an executable file that could be found in the /bin folder from PostgresSQL install location.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;4.Stored Procedure&lt;/h3&gt;&lt;br /&gt;&lt;b&gt;FYI:&lt;/b&gt;Postgres SQL does not support the CREATE PROCEDURE syntax. It does not have the typical Stored Procedure like what other databases have. But Postgresql &lt;i&gt;Function()&lt;/i&gt; can be used to create a stored-procedure like capabilities.&lt;br /&gt;&lt;br /&gt;To learn more about creating stored procedures for postgresql, visit &lt;a href="http://www.postgresonline.com/journal/index.php?/archives/15-Stored-Procedures-in-PostgreSQL.html"&gt;T-H-I-S&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Other Notable Configuration and Tips for Postgresql&lt;/h3&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;- Creating a non-existing Scripting Language (SQL Script)&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Postgresql has three (3) default sql-scripting languages available upon installation; &lt;i&gt; SQL, INTERNAL&lt;/i&gt; and &lt;i&gt;C&lt;/i&gt; &lt;br /&gt;&lt;br /&gt;One important scripting Language that could be used here is the &lt;i&gt;plpgsql&lt;/i&gt;. As for the few months using Postgresql Scripts, I can say that this one is the most powerful. We can use this to create a StoredProcedure-like function.&lt;br /&gt;&lt;br /&gt;To create this scripting language, do the steps below:&lt;br /&gt;(this one is for linux)&lt;br&gt;&lt;br /&gt;1. Go to postgresql &lt;i&gt;bin&lt;/i&gt; folder &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;(usually here -&gt; &lt;i&gt;/usr/lib/postgresql/8.3/bin&lt;/i&gt;)&lt;br /&gt;2. Run this command&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;font face="Courier New"&gt;createlang -U [username] plpgsql [dbname]&lt;/font&gt;&lt;br /&gt;&lt;br&gt;&lt;br /&gt;&lt;h2&gt;More kung-fu to follow....&lt;/h2&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-8987394248293339055?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/8987394248293339055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=8987394248293339055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/8987394248293339055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/8987394248293339055'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2009/05/postgresql-one-of-developers-kung-fu.html' title='&gt;&gt; PostgreSQL - one of the developer&apos;s kung-fu...'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-630214719921084004</id><published>2009-02-12T01:34:00.000-08:00</published><updated>2009-10-31T07:33:29.499-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cygwin'/><title type='text'>&gt;&gt; Unix Shell in your Windows Environment</title><content type='html'>&lt;br&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Cygwin&lt;/span&gt; has been so helpful among Linux users who can't avoid to put their hands on Windows platform. &lt;br /&gt;&lt;br /&gt;Because of Cygwin, a user can run unix commands on Windows environment. It's like having a Unix Console within Windows system. (Not 100% unix console but it will surely help.)&lt;br /&gt;&lt;br /&gt;You can download and install Cygwin from this site &lt;a href="http://cygwin.com"&gt;http://cygwin.com&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;For those Microsoft users who want to try Cygwin, here are some Simple and Helpful commands:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;*** If you want to navigate on directories via cygwin, type the command bellow (for example you want to navigate on drive C:)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;cd &amp;nbsp;&amp;nbsp; /cygdrive/c &lt;/h5&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;*** If you want to search on a file that has a specific word in it, you can try the command bellow:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;grep &amp;nbsp;&amp;nbsp; "word to search" &amp;nbsp;&amp;nbsp;  *.* &lt;/h5&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;grep&lt;/span&gt; → is like a find command.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;"word to search"&lt;/span&gt; → could be changed to any word that you want to search. Make sure that the word is enclosed in double quotes.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;*.*&lt;/span&gt; → this means that you are searching in all files inside the directory. You can change it to &lt;span style="font-style:italic;"&gt;*.doc&lt;/span&gt; to search only on doc files. &lt;br /&gt;&lt;br /&gt;After running the command, Cygwin will display the list of files that contains the word that you searched.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;*** If you want to connect to a linux box from your windows system, Cygwin could be of help. Just use the codes bellow:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;ssh &amp;nbsp;&amp;nbsp; userName@IPNumber&lt;/h5&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;userName&lt;/span&gt; → could be any valid user in the Linux Machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;IPNumber&lt;/span&gt; → is the IP number of the Linux Machine or you can use the Machine name.&lt;br /&gt;&lt;br /&gt;After running this command, you will be asked to enter a password; If the user has a password, just supply the valid password and click &lt;span style="font-style:italic;"&gt;ENTER&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;*** If you want to transfer files from a windows system to a Linux box, try the steps and codes bellow:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Go to the source directory &lt;span style="font-style:italic;"&gt;(eg. the source directory is C:)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;cd &amp;nbsp;&amp;nbsp; /cygdrive/c&lt;/h5&gt;&lt;br /&gt;2. Copy the file to the linux box by entering the command bellow&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;scp FileName userName@IPNumber:/home/user1/folder1&lt;/h5&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;FileName&lt;/span&gt; → is the valid File Name of any file you want to copy.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;userName&lt;/span&gt; → could be any valid user in the Linux Machine.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;IPNumber&lt;/span&gt; → is the IP number of the Linux Machine or you can use the Machine name.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;/home/user1/folder1&lt;/span&gt; → is the path to where you want the file to be copied.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;*** If you want to view a log from your windows system during runtime (typically a server log), you can try the simple codes bellow:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;DOS doesn't have a &lt;span style="font-style:italic;"&gt;tail&lt;/span&gt; command which could be used to view logs during runtime; that is why Cygwin will be of help for this. For example, the name of the log that you want to check is &lt;span style="font-style:italic;"&gt;SystemOut.log&lt;/span&gt;, just enter the code bellow:&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;tail &amp;nbsp;&amp;nbsp; -f &amp;nbsp;&amp;nbsp; SystemOut.log&lt;/h5&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Note:&lt;/span&gt; &lt;br /&gt;&lt;br /&gt;On the Cygwin console, you should be on the directory where &lt;span style="font-style:italic;"&gt;SystemOut.log&lt;/span&gt; &amp;nbsp; is located.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;*** If you want to check the status of a running application, you can try the command bellow:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;ps &amp;nbsp;&amp;nbsp; -e  &amp;nbsp;&amp;nbsp;| &amp;nbsp;&amp;nbsp; grep &amp;nbsp;&amp;nbsp; name&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style:italic;"&gt;&lt;br /&gt;*** If you want to create a password protected ZIP file, run the following command:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;h5&gt;zip  &amp;nbsp;&amp;nbsp; -r   &amp;nbsp;&amp;nbsp; -e   &amp;nbsp;&amp;nbsp; [desired file name].zip   &amp;nbsp;&amp;nbsp; [file to be zipped]&lt;/h5&gt;&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-630214719921084004?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/630214719921084004/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=630214719921084004' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/630214719921084004'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/630214719921084004'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2009/02/linux-shell-in-your-windows-environment.html' title='&gt;&gt; Unix Shell in your Windows Environment'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7366383521125025236.post-6730920148216973225</id><published>2009-02-12T00:05:00.000-08:00</published><updated>2009-06-09T19:59:40.555-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JSF Tutorial'/><title type='text'>&gt;&gt; JSF How To's</title><content type='html'>&lt;br&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Prerequisites:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Ensure that you have the following applications installed in your system:&lt;br /&gt;1. Jboss 4.2.+&lt;br /&gt;2. Eclipse Europa&lt;br /&gt;3. JVM, JDK, JRE 1.5 &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to add JSF libraries on Eclipse Europa + JBoss4.2:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. On eclipse menu Click &lt;span style="font-style:italic;"&gt;Window → Preferences&lt;/span&gt;&lt;br /&gt;2. On the opened window, select &lt;span style="font-style:italic;"&gt;Web and XML → Java Server Faces → Libraries&lt;/span&gt;&lt;br /&gt;3. On the new window, select &lt;span style="font-style:italic;"&gt;Add&lt;/span&gt;&lt;br /&gt;4. Browse through Jboss4.2.0 directory&lt;br /&gt;5. Go to &lt;span style="font-style:italic;"&gt;server → default → deploy → jboss-web.deployer → jsf-libs&lt;/span&gt;&lt;br /&gt;6. Select the three jar files &lt;span style="font-style:italic;"&gt;(jboss-faces.jar, jsf-api.jar, jsf-impl.jar)&lt;/span&gt;&lt;br /&gt;7. Give a Library Name for the selected jars &lt;span style="font-style:italic;"&gt;(eg. jbossJSF)&lt;/span&gt;&lt;br /&gt;8. Click &lt;span style="font-style:italic;"&gt;finish&lt;/span&gt;&lt;br /&gt;9. Include JSTL library; click &lt;span style="font-style:italic;"&gt;New&lt;/span&gt;&lt;br /&gt;10. On the new window, click &lt;span style="font-style:italic;"&gt;Add&lt;/span&gt;&lt;br /&gt;11. Go to Jboss4.2.0 directory&lt;br /&gt;12. Go to &lt;span style="font-style:italic;"&gt;server → default → deploy → jboss-web.deployer&lt;/span&gt;&lt;br /&gt;13. Select &lt;span style="font-style:italic;"&gt;jstl.jar&lt;/span&gt;&lt;br /&gt;14. Give library name for the selected jar &lt;span style="font-style:italic;"&gt;(eg. JSTL)&lt;/span&gt;&lt;br /&gt;15. click &lt;span style="font-style:italic;"&gt;Finish → OK&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to Create New Dynamic Web Project:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. On the eclipse menu, click &lt;span style="font-style:italic;"&gt;File → New → Other&lt;/span&gt;&lt;br /&gt;2. On the new window, select &lt;span style="font-style:italic;"&gt;Web → Dynamic Web Project&lt;/span&gt;&lt;br /&gt;3. Click &lt;span style="font-style:italic;"&gt;Next&lt;/span&gt;&lt;br /&gt;4. Put Project Name &lt;span style="font-style:italic;"&gt;(eg. demoJSF)&lt;/span&gt;&lt;br /&gt;5. On &lt;span style="font-style:italic;"&gt;Target RunTime&lt;span style="font-style:italic;"&gt;&lt;/span&gt;&lt;/span&gt;, Select &lt;span style="font-style:italic;"&gt;Jboss4.2.0&lt;/span&gt;&lt;br /&gt;6. Click &lt;span style="font-style:italic;"&gt;Next&lt;/span&gt;&lt;br /&gt;7. Check the following check boxes &lt;span style="font-style:italic;"&gt;(Dynamic Web Module, Java, Java Server Faces)&lt;/span&gt;&lt;br /&gt;8. For &lt;span style="font-style:italic;"&gt;Jboss4.2&lt;/span&gt;, use &lt;span style="font-style:italic;"&gt;Ver1.2&lt;/span&gt;&lt;br /&gt;9. Click &lt;span style="font-style:italic;"&gt;Next → Finish&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to Add a JSP Page:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. On your eclipse Java perspective, right Click the &lt;span style="font-style:italic;"&gt;Project&lt;/span&gt; then choose &lt;span style="font-style:italic;"&gt;New → JSP&lt;/span&gt;&lt;br /&gt;2. put JSP name &lt;span style="font-style:italic;"&gt;(eg addCustomer.jsp)&lt;/span&gt;, then click &lt;span style="font-style:italic;"&gt;Next&lt;/span&gt;&lt;br /&gt;3. Select, &lt;span style="font-style:italic;"&gt;New JSP File (html)&lt;/span&gt;&lt;br /&gt;4. Click &lt;span style="font-style:italic;"&gt;Finish&lt;/span&gt;&lt;br /&gt;5. Do steps 1 to 4 to add another page &lt;span style="font-style:italic;"&gt;(eg. listCustomer.jsp)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to Create Page flow on the application: &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Go to &lt;span style="font-style:italic;"&gt;Projectroot\WebContent\WEB-INF\&lt;/span&gt;&lt;br /&gt;2. Double click &lt;span style="font-style:italic;"&gt;faces-config.xml&lt;/span&gt;&lt;br /&gt;3. Select &lt;span style="font-style:italic;"&gt;Start&lt;/span&gt;&lt;br /&gt;4. Open &lt;span style="font-style:italic;"&gt;Palette&lt;/span&gt;&lt;br /&gt;5. From the palette, drag &lt;span style="font-style:italic;"&gt;Page icon&lt;/span&gt; on the form.&lt;br /&gt;6. Select &lt;span style="font-style:italic;"&gt;addCustomer.jsp&lt;/span&gt; from the list of pages&lt;br /&gt;7. Drag &lt;span style="font-style:italic;"&gt;Page icon&lt;/span&gt; again&lt;br /&gt;8. Select &lt;span style="font-style:italic;"&gt;listCustomer.jsp&lt;/span&gt;&lt;br /&gt;9. From the palette, Click &lt;span style="font-style:italic;"&gt;Link&lt;/span&gt;&lt;br /&gt;10. Link &lt;span style="font-style:italic;"&gt;addCustomer.jsp&lt;/span&gt; to &lt;span style="font-style:italic;"&gt;listCustomer.jsp&lt;/span&gt;&lt;br /&gt;11. Put on Form, &lt;span style="font-style:italic;"&gt;Outcome “success”&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to Add Managed Bean:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;1. Go to &lt;span style="font-style:italic;"&gt;Projectroot\WebContent\WEB-INF\&lt;/span&gt;&lt;br /&gt;2. Double click &lt;span style="font-style:italic;"&gt;faces-config.xml&lt;/span&gt;&lt;br /&gt;3. Click the &lt;span style="font-style:italic;"&gt;managed bean&lt;/span&gt; tab&lt;br /&gt;4. Click &lt;span style="font-style:italic;"&gt;Add&lt;/span&gt;&lt;br /&gt;5. Select &lt;span style="font-style:italic;"&gt;Create New Java Class&lt;/span&gt;&lt;br /&gt;6. Click &lt;span style="font-style:italic;"&gt;Next&lt;/span&gt;&lt;br /&gt;7. Put valid package and valid bean name &lt;span style="font-style:italic;"&gt;(eg. CustomerBean.java)&lt;/span&gt;&lt;br /&gt;8. Click &lt;span style="font-style:italic;"&gt;Next → Next → Finish&lt;/span&gt;&lt;br /&gt;9. Go to the newly created class&lt;br /&gt;10. Create Variables and Generate Setters and Getters&lt;br /&gt;11. Add a method named add() that returns a String (we may insert business logic on this method)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/7366383521125025236-6730920148216973225?l=marvinsagun.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://marvinsagun.blogspot.com/feeds/6730920148216973225/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=7366383521125025236&amp;postID=6730920148216973225' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/6730920148216973225'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7366383521125025236/posts/default/6730920148216973225'/><link rel='alternate' type='text/html' href='http://marvinsagun.blogspot.com/2009/02/jsf-tutorial.html' title='&gt;&gt; JSF How To&apos;s'/><author><name>Goryo</name><uri>http://www.blogger.com/profile/08864436003021807277</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='29' height='32' src='http://3.bp.blogspot.com/_dhb9eFu58MA/SguLi57aq3I/AAAAAAAAAFg/zvrZoXlLpvU/S220/Goryo2.jpg'/></author><thr:total>0</thr:total></entry></feed>
