View RSS Feed

Recent Blogs Posts

  1. Introducing Behaviors to Your Spring Beans

    by , 11-27-2011 at 09:55 PM
    In Spring AOP, you can use what is called an introduction (a special type of advice) that enables your objects to implement an interface dynamically, by providing the implementation class for that interface. This behavior can be multiplied to give the impression of multiple inheritance to your beans. To define an introduction, use the @DeclareParents annotation, which gives matching types a new parent.

    Java Code:
    package com.acme.springexamples.derivautos;
    import org.aspectj.lang.annotation.Aspect;
    ...
    Categories
    Spring 3 , Bean
  2. Accessing Beans (EJB)

    by , 11-26-2011 at 06:36 PM (My Java Tips)
    In the post, I will write about how to accessing a bean in EJB.


    Accessing deployed beans is simple. First write the the client code and set up JNDI environment settings for the client. It can be done via a JNDI properties file. Now you have to set the class path for the client and add the following file locations to it:

    jboss-client.jar, jnp-client.jar, EJB interfaces, and the directory where the JNDI properties file is stored

    Remember, two JNDI settings ...
    Tags: beans, ejb, jndi Add / Edit Tags
    Categories
    Java EE