J2EE

Object Container

Map

HashMap

Map<String, String> map = new HashMap<String, String>();

TreeMap

Collection

List

Ordering

ArrayList

List<String> list = new ArrayList<String>();

Iterator iterator = list.iterator();

while(iterator.hasNext())

list.get()

list.add()

list.size()

LinkedList

More transaction..

addFirst()

addLast()

getFirst()

getLast()

removeFirst()

removeLast()

Set

No Duplicate

HashSet

TreeSet

JBoss

EJB3

SessionBean

Stateless

Life-Cycle

newInstance()

Stateful

Life-Cycle

Remote

Local

Interceptor(@AroundInvoke)

InvocationContext

EntityBean

OR Mapping

JDBC+JavaBean

MessageDrivenBean

Handle JMS

Stateless

EJB Managed - MessageListener

Interceptor(@AroundInvoke)

InvocationContext

BeanStructure

META-INF

ejb-jar.xml (Deployment Descriptor)

r

Can use annotation instead!

Package

Annotation

Archieve to .jar

r

-com -classes-META-INF -MANIFEST.MF

Ant

r

<?xml version="1.0"?><project name="jartest" default="jar basedir="."> <property name="build.dir" value="${basedir}/build" /><property name="build.classes.dir" value="${basedir}/classes" /><target name="jar" description="Archieve to jar"><jar jarfile="${basedir}/ejbfile.jar">

Eclipse

JNDI

Naming Context: All name in java:comp/env

r

Resource Manager Type Connection Factory Type JNDI SubcontextJDBC javax.sql.DataSource java:comp/env/jdbcJMS javax.jms.TopicConnectionFactoryjavax.jms.QueueConnectionFactory java:comp/env/jmsJavaMail javax.mail.Session java:comp/env/mailURL java.net.URL java:comp/env/urlConnector javax.resource.cci.ConnectionFactory java:comp/env/eisJAXR Resource Adapter javax.xml.registry.ConnectionFactory java:comp/env/eis/JAXR

Memory Leakage

Pay attention to those lead area

Static Class

Member variable not set to Null

Event Listener class

JProbe