2012 – Notes on Adam Bien's YouTube Videos

May 3, 2012, Great Simplification With EJBs

Managed Bean (class Index)
@Model (stereotype which is @Named and @RequestScoped at the same time)
@Inject (field annotation on class Boundary)

EJB (class Boundary)
@Stateless annotation (class annoation)
@PersistenceContext (field annotation on type EntityManager)
em.merge(new AnEntity())

JPA Entity (class AnEntity)
@Entity (class annotation)
@Id (field annotation on id)
@GeneratedValue(strategy = GenerationType.AUTO)

Persistence Unit (GreatSimplificationPU)
Data Source: jdbc/sample
Use Java Transaction API (JTA)
Table Generation Strategy: Drop and Create

Apr 4, 2012: Creating Java EE 6 Projects With Maven 3

Maven commands
mvn archetype:generate
mvn clearn install

Copy .war file to GlassFish autodeploy folder (~/glassfish/domains/domain1/autodeploy) for automatic deployment

Mar 14, 2012: Project LightFish–Java EE Telemetry For GlassFish

GlassFish commands in asadmin
start-database
stop-database
start-domain
exit

Copy .war file to GlassFish autodeploy folder (~/glassfish/domains/domain1/autodeploy) for automatic deployment

Mar 1, 2012: 5-minutes-with-javaee

Backing Bean for JSF (class Index)
@Model annotation is like a 2-in-1 shortcut for these two annoations @Named and @RequestScoped
@Inject annotation used to inject an EJB

EJB (class MyBean)
@Stateless annotation used to declare session bean

Create a website or blog at WordPress.com
%d bloggers like this: