Thursday, March 31, 2011

Open Source software used for GateIn

- Java transaction API (JTA), Java persistence API (JPA), Java Unified express language (EL), Composite Capabilities/Preference Profiles and JSR 188 (CC/PP), JSR 170, JSR-168, JSR-286...

- PicoContainer: Is most important feature is its ability to instantiate arbitrary objects. This is done through its API, which is similar to a hash table. You can put java.lang.Class objects in and get object instances back
http://picocontainer.org

- Shindig: OpenSocial container and helps you to start hosting OpenSocial apps quickly by providing the code to render gadgets, proxy requests, and handle REST and RPC requests
http://shindig.apache.org/

- Dom4j:is an open source Java library for working with XML, XPath and XSLT. It is compatible with DOM, SAX and JAXP standards
http://www.dom4j.org

- Ehcache: Standards-based cache used to boost performance, offload the database and simplify scalability
http://ehcache.org/

- Lucene: A high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full-text search, especially cross-platform
http://lucene.apache.org

- JiBX: Binding XML to Java Code
http://jibx.sourceforge.net/

- AOP Alliance: Aspect-Oriented Programming (AOP) for java
http://aopalliance.sourceforge.net/

- Google Caja: allows websites to safely embed DHTML web applications from third parties, and enables rich interaction between the embedding page and the embedded applications
http://code.google.com/p/google-caja/

- Apache POI: Project's mission is to create and maintain Java APIs for manipulating various file formats based upon the Office Open XML standards (OOXML) and Microsoft's OLE 2 Compound Document format (OLE2). In short, you can read and write MS Excel files using Java. In addition, you can read and write MS Word and MS PowerPoint files using Java. Apache POI is your Java Excel solution (for Excel 97-2008). We have a complete API for porting other OOXML and OLE2 formats and welcome others to participate
http://poi.apache.org/

- Apache PDFBox™ is an open source Java PDF library for working with PDF documents. This project allows creation of new PDF documents, manipulation of existing documents and the ability to extract content from documents. Apache PDFBox also includes several command line utilities
http://pdfbox.apache.org/

- Quartz: is a full-featured, open source job scheduling service that can be integrated with, or used along side virtually any Java EE or Java SE application - from the smallest stand-alone application to the largest e-commerce system. Quartz can be used to create simple or complex schedules for executing tens, hundreds, or even tens-of-thousands of jobs; jobs whose tasks are defined as standard Java components that may execute virtually anything you may program them to do. The Quartz Scheduler includes many enterprise-class features, such as JTA transactions and clustering
http://www.quartz-scheduler.org/

- JUEL: is an implementation of the Unified Expression Language (EL), specified as part of the JSP 2.1 standard (JSR-245), which has been introduced in JEE5. Additionally, JUEL 2.2 implements the JSP 2.2 maintenance release specification for full JEE6 compliance
http://juel.sourceforge.net/

- Apache Shiro (JSecurity): is a powerful and easy-to-use Java security framework that performs authentication, authorization, cryptography, and session management. With Shiro’s easy-to-understand API, you can quickly and easily secure any application – from the smallest mobile applications to the largest web and enterprise applications
http://shiro.apache.org/

- Sanselan: Pure-Java library reads and writes a variety of image formats, including fast parsing of image info (size, color space, icc profile, etc.) and metadata.
This library is pure Java. It's slow, consequently, but perfectly portable. It's easier to use than ImageIO/JAI/Toolkit (Sun/Java's image support), supports more formats (and supports them more correctly). It also provides easy access to metadata
http://commons.apache.org/sanselan/

Thursday, March 17, 2011

Common GIT commands

- Get source code
git clone https://kiennguyen@github.com/kiennguyen/exo-oauth.git

- Review difference or create patch
git status
git diff file_or_folder
git show commit_hash_id
git format-patch
git show c3c3ff1e4a5b4cc6043150d7b22ed575fa593439 > EXOGTN-244.patch
git show --raw

- Commit code
git commit -a -m ""

- Commit code and push onto remote server
git push origin 3.2.x:3.2.x
git push URL current_local_branch:remote_branch

- Find information
git log --grep=EXOGTN-244
git log --oneline

- Switch branch
git checkout branche_name (such as master)

- Create new branch at local from remote address:
git checkout -b local_name remote_address
Ex: git checkout -b 3.2.x origin/3.2.x

- Add new remote branch to support pull:
git remote add trongtt_remote https://kiennguyen@github.com/trongtt/exogtn.git


- Update code to a commit: svn up -r 112212
git reset --hard f5bde1576744b66c13d2bbb4ba337cef006124bf

How to run Shindig server for testing

1. Download Shindig server (.war file) from http://shindig.apache.org/download/index.html
2. Rename x.war file to ROOT.war and drop it into Tomcat webapps folder
3. Open browser and go to address http://localhost:8080/gadgets/ifr?url=http://www.labpixies.com/campaigns/todo/todo.xml

Note: We can test with some samples in container or samplecontainer folder (for Shindig-2.0.0)
examples: http://localhost:8080/container/sample1.html

Wednesday, March 16, 2011

Data caching technologies

- Memcached is a high-performance, distributed memory object caching system, generic in nature, but originally intended for use in speeding up dynamic web applications by alleviating database load. You can think of it as a short-term memory for your applications.
- Radis
- Jboss Cache

Shindig resource links

- Apache Shindig:
Apache shindig svn: http://svn.apache.org/repos/asf/shindig/trunk
Apache shindig issues tracking: https://issues.apache.org/jira/browse/SHINDIG
Apache shindig fisheye: https://fisheye6.atlassian.com/browse/shindig/trunk

- GateIn shindig:
https://anonsvn.jboss.org/repos/gatein/components/shindig/trunk

Monday, March 14, 2011

Run GateIn tomcat bundle using HTTPS

- Create new key
keytool -genkey -alias serverkeys -keyalg RSA -keystore server.keystore -storepass changeit -keypass changeit -dname "CN=localhost, OU=MYOU, O=MYORG, L=MYCITY, ST=MYSTATE, C=MY"
Note: password of key need to be the same with password of keystore

- Import key into Sun JDk keystore
sudo /home/kiennguyen/java/software/jdk1.6.0_22/jre/bin/keytool -importkeystore -srckeystore /home/kiennguyen/java/eXoProjects/gatein/portal/branches/branch-GTNPORTAL/server.keystore -destkeystore /home/kiennguyen/java/software/jdk1.6.0_22/jre/lib/security/cacerts

Default password of jre cacerts: changeit
Password of source key store: changeit

- Edit server.xml file from Tomcat/conf folder
- comment:
- uncomment:



- Open a web browser and run address: https://localhost:8443/portal

Sunday, March 6, 2011

Running and testing openid4java open source library

- Download library from googlecode: http://code.google.com/p/openid4java/
- Put simple-openid.war into webapp folder of Tomcat
- Type some openid provider into OpenID textfield:
yahoo.com
http://me.yahoo.com
https://www.google.com/accounts/o8/id
http://kiennguyen.myopenid.com/
http://javainpassion.blogspot.com/
http://openid.aol.com
http://openid.aol.com/nguyenanhkien