Kategorier: Alle - connection - collection

av anson anson 15 år siden

781

J2EE - Basic

J2EE technology encompasses a range of components crucial for building enterprise-level applications. It includes the use of various collections such as List, Set, and Map, with implementations like ArrayList, LinkedList, and HashMap to manage data structures efficiently.

J2EE - Basic

J2EE

Memory Leakage

JProbe
Pay attention to those lead area
Event Listener class
Member variable not set to Null
Static Class

EJB3

JNDI
Naming Context: All name in java:comp/env

Resource Manager Type

Connection Factory Type

JNDI Subcontext

JDBC

javax.sql.DataSource

java:comp/env/jdbc

JMS

javax.jms.TopicConnectionFactory

javax.jms.QueueConnectionFactory

java:comp/env/jms

JavaMail

javax.mail.Session

java:comp/env/mail

URL

java.net.URL

java:comp/env/url

Connector

javax.resource.cci.ConnectionFactory

java:comp/env/eis

JAXR Resource Adapter

javax.xml.registry.ConnectionFactory

java:comp/env/eis/JAXR

Archieve to .jar

-com

-classes

-META-INF

-MANIFEST.MF

Eclipse
Ant

<?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">

Annotation
BeanStructure
Package
META-INF

ejb-jar.xml (Deployment Descriptor)

Can use annotation instead!

MessageDrivenBean
EJB Managed - MessageListener
Handle JMS
EntityBean
JDBC+JavaBean
OR Mapping
SessionBean
Interceptor(@AroundInvoke)

InvocationContext

Local
Remote
Stateful
Stateless

Life-Cycle

newInstance()

JBoss

Object Container

Collection
Set

TreeSet

HashSet

No Duplicate

List

LinkedList

removeLast()

removeFirst()

getLast()

getFirst()

addLast()

addFirst()

More transaction..

ArrayList

list.size()

list.add()

list.get()

Iterator iterator = list.iterator();

while(iterator.hasNext())

List list = new ArrayList();

Ordering

Map
TreeMap
HashMap

Map map = new HashMap();