Thursday, September 30, 2004
jndi
If I had written the code like this:Context c = newInitialContext();
DataSource ds = c.lookup("java:comp/env/jdbc/Bank");
the container would look up 'jdbc/Bank' in the EJB's local namespace. Now using a resource reference, we can say that in this EJB, the data source known to the container as BankDB is referred to locally as jdbc/Bank. In this example 'jdbc/Bank' is the 'coded name.' In other words, using resource references allows us to resolve incorrect or unknown resource names at deployment time, without modifying the code.
So when we specify a name that begins with java:comp/env, the JNDI implementation is being told to make a lookup in the part of the name/directory that is dedicated to that particular EJB.
Starting with EJB 1.1, all beans have a default JNDI context called the enterprise naming context. The default context exists in the namespace called java:comp/env (based on a URL context for the java: URL scheme) and its subdirectories. When a bean is deployed, any beans it uses are mapped into the java:comp/env/ejb directory so that the bean references can be obtained at runtime through a simple and consistent use of the JNDI ENC. This eliminates network and implementation specific use of JNDI to obtain bean references. For example, you might use a name such as "java:comp/env/jdbc/myDB" from the initial context to name the myDB database. At the root context of the namespace is a binding with the name "comp", which is reserved for component-related bindings.
In addition, the name "env" is bound to a subtree that is reserved for the component's environment-related bindings, as defined by its deployment descriptor. The J2EE specifications recommend that EJBs be placed under the "ejb" subtree. For example, an EnrollmentCartHome EJB might be named "java:comp/env/ejb/EnrollmentCartHome".
DataSource ds = c.lookup("java:comp/env/jdbc/Bank");
the container would look up 'jdbc/Bank' in the EJB's local namespace. Now using a resource reference, we can say that in this EJB, the data source known to the container as BankDB is referred to locally as jdbc/Bank. In this example 'jdbc/Bank' is the 'coded name.' In other words, using resource references allows us to resolve incorrect or unknown resource names at deployment time, without modifying the code.
So when we specify a name that begins with java:comp/env, the JNDI implementation is being told to make a lookup in the part of the name/directory that is dedicated to that particular EJB.
Starting with EJB 1.1, all beans have a default JNDI context called the enterprise naming context. The default context exists in the namespace called java:comp/env (based on a URL context for the java: URL scheme) and its subdirectories. When a bean is deployed, any beans it uses are mapped into the java:comp/env/ejb directory so that the bean references can be obtained at runtime through a simple and consistent use of the JNDI ENC. This eliminates network and implementation specific use of JNDI to obtain bean references. For example, you might use a name such as "java:comp/env/jdbc/myDB" from the initial context to name the myDB database. At the root context of the namespace is a binding with the name "comp", which is reserved for component-related bindings.
In addition, the name "env" is bound to a subtree that is reserved for the component's environment-related bindings, as defined by its deployment descriptor. The J2EE specifications recommend that EJBs be placed under the "ejb" subtree. For example, an EnrollmentCartHome EJB might be named "java:comp/env/ejb/EnrollmentCartHome".
Tuesday, September 28, 2004
Monday, September 27, 2004
Sunday, September 26, 2004
Friday, September 24, 2004
Thursday, September 23, 2004
webservice:encoding
There are 4 messaging mode:
RPC/Literal(recommended), Document/Literal(recommended)
RPC/Encoded, Document/Encoded.
where X/Y, X is the message style (how to represent it),
Y is encoding. Literal means xml fragement.
RPC messaging style only has one child, the function which
contains its own children for the parameters.
Message flow/pattern: request/response or one-way.
Both RPC & Document supports both flow.
However, it is common for RPC to support request/response.
http://java.sun.com/developer/Books/j2ee/jwsa/JWSA_CH10.pdf
RPC literal example:
RPC/Encoding example:
http://www-106.ibm.com/developerworks/library/ws-jaxrpc1/
RPC/Literal(recommended), Document/Literal(recommended)
RPC/Encoded, Document/Encoded.
where X/Y, X is the message style (how to represent it),
Y is encoding. Literal means xml fragement.
RPC messaging style only has one child, the function which
contains its own children for the parameters.
Message flow/pattern: request/response or one-way.
Both RPC & Document supports both flow.
However, it is common for RPC to support request/response.
http://java.sun.com/developer/Books/j2ee/jwsa/JWSA_CH10.pdf
RPC literal example:
RPC/Encoding example:
http://www-106.ibm.com/developerworks/library/ws-jaxrpc1/
Saturday, September 18, 2004
windows:ephemeral-port
http://www.jsiinc.com/SUBK/tip5200/rh5249.htm
from 1024 to 5000 with wait_state for 4 mins
http://www.jsiinc.com/SUBN/tip6600/rh6633.htm
from 1024 to 5000 with wait_state for 4 mins
http://www.jsiinc.com/SUBN/tip6600/rh6633.htm
Friday, September 17, 2004
thread:sleep-yield
http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=27&t=001087
yield only yield to other thread in the same VM.
Sleep really sleep
http://hegel.ittc.ukans.edu/projects/nachos/html-source/thread.cc.html
yield only yield to other thread in the same VM.
Sleep really sleep
http://hegel.ittc.ukans.edu/projects/nachos/html-source/thread.cc.html
Wednesday, September 15, 2004
Monday, September 13, 2004
beep
http://xml.coverpages.org/beep.html
http://wwwin-eng.cisco.com/Eng/IOS/Graffiti/PRDs/beep-prd.doc
· Beepcore (http://www.beepcore.org/), which provides a “beepcore” software library, available in Java, C, and Tcl flavors.
· CodeFactory (http://www.codefactory.se), which provides RoadRunner, an implementation of the BEEP protocol written in C.
http://www.xml.com/lpt/a/2002/10/16/ends.html
http://wwwin-eng.cisco.com/Eng/IOS/Graffiti/PRDs/beep-prd.doc
· Beepcore (http://www.beepcore.org/), which provides a “beepcore” software library, available in Java, C, and Tcl flavors.
· CodeFactory (http://www.codefactory.se), which provides RoadRunner, an implementation of the BEEP protocol written in C.
http://www.xml.com/lpt/a/2002/10/16/ends.html
Sunday, September 12, 2004
Saturday, September 11, 2004
Friday, September 10, 2004
Thursday, September 09, 2004
windows:name-resolver
http://www.windowsitlibrary.com/Content/172/01/13.html
sequence:
NetBIOS name cache
WINS
Broadcast
LMHOSTS
HOSTS
Domain Name System (DNS)
sequence:
NetBIOS name cache
WINS
Broadcast
LMHOSTS
HOSTS
Domain Name System (DNS)
Wednesday, September 08, 2004
Saturday, September 04, 2004
Thursday, September 02, 2004
linux:networking:ip-tutorial
http://www.kernelnewbies.org/documents/
http://www.kernelnewbies.org/documents/kdoc/kernel-locking.pdf
for kernel locking
source code on web with cross reference
http://lxr.linux.no/source/net/ipv4/ip_forward.c
tutorial on stack
http://www-scf.usc.edu/~rishisin/ngroup/23
http://www.kernelnewbies.org/documents/kdoc/kernel-locking.pdf
for kernel locking
source code on web with cross reference
http://lxr.linux.no/source/net/ipv4/ip_forward.c
tutorial on stack
http://www-scf.usc.edu/~rishisin/ngroup/23