From Seam 3 to Apache DeltaSpike (seam-beans.xml)

712 Views Asked by At

I am migrating from Seam 3 to DeltaSpike on WildFly 8 (Java EE 7). What is the equivalent DeltaSpike file to Seam's seam-beans.xml? Could you tell me any more info?

Edit:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:j="urn:java:ee" xmlns:s="urn:java:seam:core" xmlns:c="urn:java:xxx.xxxxxxxxx.core.model">

    <c:Configuration>
        <j:modifies />
        <c:tradingEnabled>false</c:tradingEnabled>
        <c:defaultCurrency>USD</c:defaultCurrency>
        <c:defaultPeriodLength>300000</c:defaultPeriodLength>
        <c:updateTime>5</c:updateTime>
    </c:Configuration>
    ....

This what I did with seam-beans.xml, which did not work for me in beans.xml (values are not injected).

Thanks

1

There are 1 best solutions below

0
Karl Kildén On

You need to create a producer and put these values in a normal properties file instead. Look at @Produces

This should probably have been tagged CDI too because some problems you solved with Seam is of course solved directly with CDI core and not Deltaspike.

This example will get you there: Depedency inject request parameter with CDI and JSF2

Instead of producing from the request parameter map you will produce from your resourceBundle.

I also think deltaspike may have a functionality for this either done or in the works but it would be good practice for you to write this producer and it is very minimal anyways