Search

6.2. A Bean With No Dependencies

download PDF
Example 6.1, “Deployment Descriptor for a Plain POJO” shows a deployment descriptor for a plain POJO with no dependencies. This is the starting point for integrating the Microcontainer with Spring or Guice.

Example 6.1. Deployment Descriptor for a Plain POJO

<deployment xmlns="urn:jboss:bean-deployer:2.0">

  <bean name="PlainPojo" class="org.jboss.demos.models.plain.Pojo"/>

  <beanfactory name="PojoFactory" class="org.jboss.demos.models.plain.Pojo">
    <property name="factoryClass">org.jboss.demos.models.plain.PojoFactory</property>
  </beanfactory>

</deployment>
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.