[JBoss-user] [Management, JMX/JBoss] - MBeans and global JNDI

2005-08-28 Thread iksrazal
Hi all, 

I have a simple goal of invoking a session bean on app startup: 


  | ?xml version=1.0 encoding=UTF-8?
  | server
  |   classpath codebase=. archives=CallCentreWebServiceJAR.jar/
  |   mbean code=org.jboss.varia.scheduler.Scheduler 
name=CallCentreWeb:service=Scheduler
  | attribute name=StartAtStartuptrue/attribute
  | attribute 
name=SchedulableClasscom.hostedtelecom.callcentreweb.util.TimerStart/attribute
  | attribute name=InitialStartDateNOW/attribute
  | attribute name=SchedulePeriod5000/attribute
  | attribute name=InitialRepetitions-1/attribute
  | dependsjboss.j2ee:jndiName=ejb/TimerCallCentre,service=EJB/depends
  | depends
  |   mbean code=javax.management.timer.Timer 
name=jboss:service=Timer/
  | /depends
  |   /mbean
  | /server
  | 

I probably do not need my first depends. My app is in the jar shown. 

I can get TimerStart to work via a static reference in the client login when it 
occurs. Using the same code in the mbean, I get 'env not bound' . Here's my 
code: 


  | public class TimerStart implements Schedulable {
  | 
  |   private static final String JNDI_TIMER= 
java:comp/env/ejb/TimerCallCentre;
  | 
  |   public void perform(Date now, long remainingRepetitions) {
  | 
  | ServiceLocator serviceLocator = ServiceLocator.getInstance();
  | TimerCallCentreHome timerCallCentreHome = (TimerCallCentreHome) 
serviceLocator.getEJBHome(JNDI_TIMER,TimerCallCentreHome.class);
  |   
  | }
  | }
  | 

I've tried ejb/TimerCallCentre ,  java:ejb/TimerCallCentre etc. My ejb-name 
is: 

ejb-nameTimerCallCentreBean/ejb-name

Please help,
iksrazal
 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3891987#3891987

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3891987


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Auto launch ejb.Timer without webapp?

2005-08-13 Thread iksrazal
Hi all,

I'd like to perform a DB task every hour or so in an EJB container.
However, I can't seem to figure out a simple way to have the timer load
on startup as I can't do a simple load-on-startup servlet or
ServletContextlistener. The app is contained only in a jar, deployed in
JBoss that just has web services exposed as Stateful Beans.

My idea is to do it via a static initializer, but I'm wondering if
there is a better way?

I'm running 4.0.1sp1 on linux. 

Any ideas?
iksrazal 

View the original post : 
http://www.jboss.org/index.html?module=bbop=viewtopicp=3889919#3889919

Reply to the post : 
http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3889919


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user