Thursday, May 1, 2008

PPTP client config on Ubuntu 8.04

- install client program
sudo apt-get install pptp-linux
- create the /etc/ppp/options.pptp file, which sets options common to all tunnels :
lock noauth nobsdcomp nodeflate
Here is my smaple file :

# Lock the port

# Authentication
# We don't need the tunnel server to authenticate itself

# We won't do EAP, CHAP, or MSCHAP, but we will accept MSCHAP-V2

# Compression
# Turn off compression protocols we know won't be used
- create or add lines to the /etc/ppp/pap-secrets file, which olds usernames and passwords :
Here is my smaple file :

# INBOUND connections

# Every regular user can use PPP and has to use passwords from /etc/passwd
* hostname "" *

# UserIDs that cannot use PPP at all. Check your /etc/passwd and add any
# other accounts that should not be able to use pppd!
guest hostname "*" -
master hostname "*" -
root hostname "*" -
support hostname "*" -
stats hostname "*" -

# OUTBOUND connections

# Here you should add your userid password to connect to your providers via
# PAP. The * means that the password is to be used for ANY host you connect
# to. Thus you do not have to worry about the foreign machine name. Just
# replace password with your password.
# If you have different providers with different passwords then you better
# remove the following line.

# * password
shams kw pass *

- Create a /etc/ppp/peers/$TUNNEL file :

pty "pptp $SERVER --nolaunchpppd"
file /etc/ppp/options.pptp
ipparam $TUNNEL

Here is my file :

# tunnel Internet, written by pptpconfig $Revision: 1.12 $

# name of tunnel, used to select lines in secrets files
remotename kw

# name of tunnel, used to name /var/run pid file
linkname kw

# name of tunnel, passed to ip-up scripts
ipparam kw

# data stream for pppd to use
pty "pptp --nolaunchpppd "

# domain and username, used to select lines in secrets files
name shams


# do not require the server to authenticate to our client

# adopt defaults from the pptp-linux package
file /etc/ppp/options.pptp

# end of tunnel file

- start your connection with pon command :

sudo pon kw

- stop your connection with poff command :

sudo poff kw

Saturday, April 12, 2008

What happening to Java EE ???

I was working with J2EE (specially EJB) from until 2003. because of J2EE performance issues and slow development I decide to switch to another solutions like lightweight containers.

After a while I chose Spring as a business framework and Hibernate as a ORM tool and in presentation layer Struts, WebWork and a little Tapestry.

From 2003 until 3 months ago Hibernate + Spring + (Webwork or Tapesty) was my favorites in all projects and I have very success story with these solutions.

About 3 months ago I was join to new team and began to work on a project with Java EE 5 standard specification again.

Weblogic has been chosen as an Application Server and JPA as a persistence mechanism.

Weblogic need high resources, and its not good for development environment.
we decide to chose another server for development environment. I began to test GlassFish and Geronimo.

there was a lot of problems during these tests and now I am really confused. I don't understand that what portability means in Java EE. what is standard in Java EE.

Here is a list of my problems

1 - JNDI naming is not standard in Java EE and each server has its naming convention for JNDI.
than you most change lookup code for each server.

2 - Hibernate does not understand Geronimo JTA Transaction and you most add some code to fix this issue.

3 - Open JPA (default JPA implementation in Geronimo) has its database model for OneToMany Relations. then you most change database and table relation for this server.

4 - Toplink (default JPA implementation for GlassFish) not support some kind of table mapping for class hierarchy.

5 - JAX WS Web Service Client for each server is unique. and you need to write deferent code for each server.

that was my Java EE tragic story.