Sunday, August 28, 2011

Change GateIn Context path

For Jboss bundle here: http://community.jboss.org/wiki/ChangeGateInContextPath
For Tomcat bundle, we change some files:
1. Rename portal.war->myportal.war
2. In myportal.war/WEB-INF/web.xml
Change to myportal
3. gatein/conf/configuration.xml

default.portal.container
myportal

]]>
4. To avoid some other exceptions:
- Rename tomcat/conf/Catalina/portal.xml to tomcat/conf/Catalina/myportal.xml
- Change some value related to docBase to myportal value

Friday, August 26, 2011

Run Web Application Server with Debug mode

Example for Jboss gatein:

EXO_CONFIG_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.exoplatform.container.configuration.debug"

JPDA_TRANSPORT=dt_socket
JPDA_ADDRESS=8000

REMOTE_DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
JMX_AGENT="-Dcom.sun.management.jmxremote"
JAVA_OPTS="$JAVA_OPTS$EXO_CONFIG_OPTS $REMOTE_DEBUG"
export JAVA_OPTS

Thursday, July 7, 2011

Ubuntu - setup environment for Drupal portal

Apache:
$ sudo apt-get install apache2

- start Apache:
$ sudo /etc/init.d/apache2 start
- Test Apache sever
http://localhost
- Stop
$ sudo /etc/init.d/apache2 stop

PHP
$ sudo apt-get install php5-mcrypt php5-curl php5-gd
- View results
$ sudo dpkg --list | grep php

MySQL

Drupal

Wednesday, June 15, 2011

Solution for too many open files of Tomcat in Ubuntu

Open: sudo gedit /etc/sysctl.conf
add/edit system-level variable: fs.file-max=200000

Open: sudo gedit /etc/security/limits.conf
add/edit shell-level variable:
* soft nofile 2048
* hard nofile 2048

Restart OS.
Check values by command:

cat /proc/sys/fs/file-max
and
ulimit -n

Tuesday, June 7, 2011

Cloud concepts: SaaS - IaaS - PaaS

SaaS - Software as a Service
IaaS - Infrastrure as a Service
PaaS - Platform as a Service, sometimes reffered to Hardware as as Service (HaaS)

Wednesday, June 1, 2011

Principles of OOP

Class Design Principles
# (OCP) The Open-Closed Principle
# (LSP) The Liskov Substitution Principle
# (DIP) The Dependency Inversion Principle
# (ISP) The Interface Segregation Principle

Principles of Package Cohesion
# (REP) The Reuse/Release Equivalency Principle
# (CCP) The Common Closure Principle
# (CRP) The Common Reuse Principle

Principles of Package Coupling
# (ADP) The Acyclic Dependencies Principle
# (SDP) The Stable Dependencies Principle
# (SAP) The Stable Abstraction Principle

Share protocol

Network File System(NSF) for Unix
SMB for Windows
Direct Attached Storage(DAS)
Network Attached Storage(NAS)
Storage Area Network(SAN)