Skip to main content

Manfred Riem

I love working with a broad range of technologies. At work it is mostly JavaEE and JavaSE technologies, as a hobby I do some Java on devices.

 

mriem's blog

Working towards the first JSF 2.3 milestone

Posted by mriem on December 24, 2014 at 8:00 AM PST

As we are working towards our first JSF 2.3 milestone release I want to tell everyone once it is out please start testing. With your help we are able to catch so much more before we ship. This is why we are going to be doing milestone releases. So once the first one is out try it out! I hope you all will make testing your JSF application with JSF 2.3 a New Years resolution!

Enjoy!

MVC and Adopt a JSR

Posted by mriem on December 19, 2014 at 12:52 PM PST

Today I participated in a phone call on Adopt-a-JSR for the MVC 1.0 specification.

While we do not have a whole lot of things that can be worked upon by a JUG at the moment I do want to point out that once we start publishing SNAPSHOT releases and milestones we will be looking forward to your contributions!

JavaEE Tip #6 - Resources

Posted by mriem on December 18, 2014 at 9:15 AM PST

The @Resources annotation makes it possible to define resources that you are going to lookup at runtime. The example describes a way to lookup a datasource that is mentioned in the @Resources annotation on the class.


@Resources(value={
@Resource(name="ShoppingCartDB", type=javax.sql.DataSource),

JavaEE Tip #5 - Resource

Posted by mriem on December 15, 2014 at 4:57 AM PST

With the @Resource annotation you define the resource you want to inject. Note this annotation is an older style annotation. Going forward the recommendation is to use the CDI @Inject annotation.

In code

  @Resource
  UserTransaction utx;

Enjoy!

JavaEE Tip #4 - PreDestroy

Posted by mriem on December 13, 2014 at 7:29 AM PST

With the @PreDestroy annotation you annotate a single method in your class that you want to be called just before your object (EJB, JSF managed bean, CDI bean) is taken out of service.

In code

  @PreDestroy
  public void destroy() {
    // put your destroy code here.
  }

Enjoy!

JavaEE Tip #3 - PostConstruct

Posted by mriem on December 12, 2014 at 6:40 AM PST

The @PostConstruct annotation makes it possible to run initialization code just before something (EJB, JSF managed bean, CDI bean) is put into service.

In code

  @PostConstruct
  public void init() {
    // put your initialization code here.
  }

JavaEE Tip #2 - Location of the JavaEE tutorial

Posted by mriem on November 6, 2014 at 8:37 AM PST

And it is tutorial time!

Where are the JavaEE tutorials for each of the JavaEE versions?

Enjoy!

JavaEE Tip #1 - Location of the JavaEE API documentation

Posted by mriem on November 5, 2014 at 11:40 AM PST

If you want to find a specific version of the JavaEE API documentation the following links connect you to them:

JSF 2.3 Injecting the view map

Posted by mriem on October 31, 2014 at 2:22 AM PDT

Another CDI alignment issue done

In code

@ViewMap
@Inject
Map viewMap;

In words you can now inject the view map for use in your CDI managed bean.

Enjoy!

JSF 2.3 changes

Posted by mriem on October 30, 2014 at 12:38 PM PDT

The following spec issues were addressed

#1333 - Support @Inject for UIViewRoot
#1332 - Let CDI handle #{view}
#1331 - Let CDI handle #{application}

And the following other issues that have a 2.3 impact were addressed

#3425 - Apply Java SE 7 Strings in switch
#3427 - Apply Java SE 7 multi-catch
#3444 - Apply Java SE 7 multi-catch: part 3 of 3