This content has been marked as final.
Show 2 replies
-
1. Re: my-service.xml having access to local ejbs
fkhan Jun 1, 2006 4:13 PM (in response to fkhan)I have included the the service withing the ear by added a jboss-app.xml to to the META-INF directory. This new jboss-app.xml
<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd"> <jboss-app> <!-- The service element specifies a service archive (SAR) to deploy. --> <module> <service>ambient.sar</service> </module> </jboss-app>
I then added to the root of the exploded ear an directory called ambient.sar that only contained one file a jboss-service.xml located in the META-INF subdirectory (ext.ear/ambient.sar/META-INF/jboss-service.xml)
Now within the jboss-service.xml the previously seperately defined services are defined<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="com.ambientdevices.wine.devicetype.devices.Orb" name="jboss:service=Orb"> <attribute name="DeviceName">orb</attribute> <depends>jboss:service=Naming</depends> </mbean> <mbean code="com.ambientdevices.wine.devicetype.devices.Dashboard" name="jboss:service=Dashboard"> <attribute name="DeviceName">dashboard</attribute> <depends>jboss:service=Naming</depends> </mbean> <mbean code="com.ambientdevices.wine.devicetype.devices.MarketWatcher" name="jboss:service=MarketWatcher"> <attribute name="DeviceName">marketWatcher</attribute> <depends>jboss:service=Naming</depends> </mbean> <mbean code="com.ambientdevices.wine.devicetype.devices.WeatherGlass" name="jboss:service=WeatherGlass"> <attribute name="DeviceName">weatherGlass</attribute> <depends>jboss:service=Naming</depends> </mbean> <mbean code="com.ambientdevices.wine.devicetype.devices.WeatherWizard" name="jboss:service=WeatherWizard"> <attribute name="DeviceName">weatherWizard</attribute> <depends>jboss:service=Naming</depends> </mbean> <mbean code="com.ambientdevices.wine.billing.BillingServer" name="jboss:type=billing,name=Billing"> <attribute name="JndiName">ambient/billing/BillingServer</attribute> <depends>jboss:service=Naming</depends> </mbean> <mbean code="org.jboss.varia.scheduler.Scheduler" name="jboss:service=DailyBillingService"> <attribute name="StartAtStartup">true</attribute> <attribute name="SchedulableMBean">jboss:type=billing,name=Billing</attribute> <attribute name="SchedulableMBeanMethod">doDailyBilling()</attribute> <attribute name="InitialStartDate">NOW</attribute> <attribute name="SchedulePeriod">21600000</attribute> <attribute name="InitialRepetitions">1</attribute> </mbean> </server>
Now when the schedulable thread executes an error occurs with Spring but that seems like a sperate issue -
2. Re: my-service.xml having access to local ejbs
fkhan Jun 2, 2006 12:02 PM (in response to fkhan)The above does not actually solve the problem of addressing local ejbs from an Schedulable MBean. Any advice would be apprieciated.