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;
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