Bean configuration tag

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
(renamed tag to directive)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
[[Category:Configuration]] [[Category:IOC]]
+
[[Category:Configuration]] [[Category:Inversion of Control]]
 
==See Also==
 
==See Also==
  
 
[[Inversion of Control]]
 
[[Inversion of Control]]
  
==tags==
+
==directives==
  
 
{|
 
{|
||tag||description
+
||directive||description
 
|-
 
|-
 
||init||Block of [[Inversion of Control]] setters
 
||init||Block of [[Inversion of Control]] setters

Latest revision as of 20:20, 21 February 2006

See Also

Inversion of Control

directives

directive description
init Block of Inversion of Control setters
jndi-name JNDI name to store the bean
local-transaction-optimization For transactional beans, use the local transaction optimization when possible
mbean-interface Java interface exposing the bean's management interface
mbean-listener Registers the bean to listen for JMX events
mbean-name JMX name to store the bean
type The Java class of the bean
var EL variable to store the bean

example

...
<bean var="movie"
      type="com.foo.MyMovie">
  <init>
    <name>Fellowship of the Ring</name>
    <director>Peter Jackson</director>
  </init>
</bean>


...
<servlet servlet-name="movie-display"
         servlet-class="com.foo.MovieServlet">
  <init>
    <movie>${movie}</movie>
  </init>
</servlet>
Personal tools