[Beginners Corner] - TimedObject question.
by UBorba
Hi,
I wrote a class:
| public class PnaScheduleFacade implements SessionBean, TimedObject {
| public void ejbTimeout(Timer arg0) {
| // task code.
| }
|
| public TimerHandle createTimerHandle(long interval) {
| TimerService timerService = context.getTimerService();
| Timer timer = timerService.createTimer(interval, interval, null);
| return timer.getHandle();
| }
|
| }
|
and another class to start the service:
| public class PnaScheduler implements Schedulable {
|
| public void perform(Date arg0, long arg1) {
| if(!started) {
| PnaScheduleFacadeLocal psLocal = EJBUtil.findLocalObject(PnaScheduleFacadeLocal.class);
| TimerHandle handle = psLocal.createTimerHandle(interval);
| System.out.println("Handle = " + handle);
| started = true;
| }
| }
|
| }
|
The schedule does it fine, but every time I restart my JBoss it will create
another Timer, and JBoss will also restart old Timers that are serialized, I need to check in code if there is already a Timer that restarts the service and create another one only if necessary.
Thanks for any help/directions.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967561#3967561
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967561
19 years, 8 months
[Installation, Configuration & Deployment] - Custom Interceptors
by kistler59
I'm trying to develop an Interceptor that will be invoked upon executing a method up on an slsb (v2.x) however, output statements are not printing to the log and therefore I don't think that they are acutally being executed.
I attempted this by adding an interceptor tag in the standardjboss.xml file
anonymous wrote :
| <invoker-proxy-binding>
| stateless-rmi-invoker
| <invoker-mbean>jboss:service=invoker,type=jrmp</invoker-mbean>
| <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-factory>
| <proxy-factory-config>
| <client-interceptors>
|
| org.jboss.proxy.ejb.HomeInterceptor
| org.jboss.proxy.SecurityInterceptor
| org.jboss.proxy.TransactionInterceptor
| <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor
| <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor
|
|
| com.dlens.security.DLWAuthorizationInterceptor <!-- added here! -->
| org.jboss.proxy.ejb.StatelessSessionInterceptor
| org.jboss.proxy.SecurityInterceptor
| org.jboss.proxy.TransactionInterceptor
| <interceptor call-by-value="false">org.jboss.invocation.InvokerInterceptor
| <interceptor call-by-value="true">org.jboss.invocation.MarshallingInvokerInterceptor
|
| </client-interceptors>
| </proxy-factory-config>
| </invoker-proxy-binding>
|
Does anyone have any suggestions or can point me to some good documentation. and at one point the compiled class was not in the classpath - but i fixed that.
-Keith
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967560#3967560
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967560
19 years, 8 months
[JBoss jBPM] - Alfresco has embedded jBPM
by alf_dave
Hi jBPM developers and contributors,
For the last couple of months we've been embedding jBPM into Alfresco. We've found the quality of the jBPM code, documentation and examples to be very good and haven't really needed to use this forum too much! Excellent work.
The integration has involved:
1) Layering the Alfresco Web Client User Interface onto jBPM - this means using our own meta-data support to describe the data required by a process and each task and having that drive the Alfresco UI dialogs.
2) Encapsulating jBPM behind a service-oriented API - potentially allowing RMI or Web Service access.
3) Allowing jBPM process context and task variables to reference objects inside the Alfresco Content Repository - jBPM beanshell scripts can navigate the repository and perform operations (such as checkout,checkin,
transform).
4) Using Spring Modules to tie Alfresco & jBPM persistence and transactions
5) Hooking into various jBPM plug-in points such as Value Converters, Task Factory etc
I understand that work around task meta-data and task dialog rendering is taking place for 3.2. We'd be happy to share our experience in this area.
A preview of this integration will be available soon - some documentation can be found on our wiki at http://wiki.alfresco.com/wiki/Workflow.
Thanks.
David Caruana,
Alfresco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3967556#3967556
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3967556
19 years, 8 months