[JBoss-user] [Management, JMX/JBoss] - Send mails from MBean

2005-09-22 Thread bnadesan
Hi All,

Can someone post a sample as to how to call/send mail from am MBean. I know how 
to write an MBean. Bascially I struggling with the Mail lookup. 

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

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


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Management, JMX/JBoss] - Re: JMS-dependent MBean breaks on JBoss startup

2005-09-21 Thread bnadesan
Hi,

I still get the javax.naming.NameNotFoundException: QueueConnectionFactory not 
bound exception When I start my app server(jboss 3.2.3).

Here is the code snippet in my MBean

  InitialContext ctx = new InitialContext();

  QueueConnectionFactory qconFactory = (QueueConnectionFactory)
 ctx.lookup(QueueConnectionFactory);

  QueueConnection qcon = qconFactory.createQueueConnection();
  QueueSession qsession =
 qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

  Queue queue = (Queue) ctx.lookup(QUEUE);
  QueueReceiver qreceiver = qsession.createReceiver(queue);


and here in the jboss-service.xml
---

  
jboss.mq:service=InvocationLayer,type=UIL2
jboss.mq.destination:service=Queue,name=testQueue
  

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

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


---
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42 plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - Re: JMSExpection: Invalid transaction id.

2005-09-06 Thread bnadesan
Here is the code snippet

package movie.ejb;

import java.rmi.*;
import javax.ejb.*;
import javax.jms.*;
import javax.naming.*;

/**
 * @ejb.bean
 *  name=MessageController
 *  extends=javax.ejb.MovieSessionBean
 *  view-type=remote
 *  jndi-name=movie.ejb.MessageControllerHome
 *  description=EJB to handle Message Notification
 *
 * @ejb.interface
 *  remote-class=movie.ejb.MessageController
 *  extends=javax.ejb.EJBObject
 * @ejb.home
 *  remote-class=movie.ejb.MessageControllerHome
 *  extends=javax.ejb.EJBHome
 *
 *
 * @ejb.transaction
 *  type=Supports
 * @ejb.util generate = physical
 *
 * @ejb.resource-ref res-ref-name = jms/QueueConnectionFactory
 *   res-type = javax.jms.QueueConnectionFactory
 *   res-auth = Container
 * @jboss.resource-ref res-ref-name = jms/QueueConnectionFactory
 * jndi-name = java:/JmsXA
 *
 */

public class MessageControllerBean  extends MovieSessionBean{

  private QueueSession qsession;
  private QueueSender qsender;
  private Queue queue;

  /**
   * @ejb.create-method
   */
  public void ejbCreate() throws RemoteException {
try {
  String JMS_FACTORY=java:comp/env/jms/QueueConnectionFactory;
  String QUEUE=queue/testQueue;
  Context namingCtx = new InitialContext();
  QueueConnectionFactory qconFactory =
 (QueueConnectionFactory) namingCtx.lookup(JMS_FACTORY);

  QueueConnection qcon = qconFactory.createQueueConnection();
  qsession = qcon.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
  queue = (Queue) namingCtx.lookup(QUEUE);
} catch (Exception e) {
  e.printStackTrace();
  throw new RemoteException(e.getMessage());
}
  }

  /**
   * Send message method.
   *
   * @ejb.interface-method
   */
  public void sendMessage(String message) throws RemoteException {
try {
  TextMessage msg = qsession.createTextMessage();
  msg.setText(message);
  qsender = qsession.createSender(queue);
  qsender.send(msg);
} catch (Exception e) {
  e.printStackTrace();
  throw new RemoteException(e.getMessage());
}
  }
}

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

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


---
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] [Messaging, JMS JBossMQ] - JMSExpection: Invalid transaction id.

2005-09-05 Thread bnadesan
Hi All,

I'm tring to use JMS and When I send a message to the Queue. I get the 
following exception. I'm currently using JBoss 3.2.3. I hope someone can help 
me in resolving this issue.

javax.jms.JMSException: Invalid transaction id.
at 
org.jboss.mq.SpyXAResourceManager.addMessage(SpyXAResourceManager.java:95)
at org.jboss.mq.SpySession.sendMessage(SpySession.java:728)
at org.jboss.mq.SpyQueueSender.internalSend(SpyQueueSender.java:118)
at org.jboss.mq.SpyQueueSender.send(SpyQueueSender.java:68)
at movie.ejb.MessageControllerBean.sendMessage(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:297)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at 
org.jboss.proxy.ejb.StatefulSessionInterceptor.invoke(StatefulSessionInterceptor.java:104)
at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:85)
at $Proxy46.sendMessage(Unknown Source)
at movie.ejb.ReservationBean.bookSeats(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:297)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:128)
at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:118)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
at org.jboss.ejb.Container.invoke(Container.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at 
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at 
org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:90)
at 
org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)

[JBoss-user] [Management, JMX/JBoss] - Security Problems with JBOSS

2004-06-17 Thread bnadesan
I have an mbean which tries to access an EJB in the startup() routine. I have the 
following dependency setup in my jboss-service.xml file.


jboss.j2ee:service=EjbModule,module=SynchronyEJB.jar


My mbean basically performs a lookup task in the startup routine. When I start the 
application I get the following error on my server.log.
2004-06-16 17:45:59,049 INFO [org.jboss.ejb.EjbModule] Started 
jboss.j2ee:module=SynchronyEJB.jar,service=EjbModule
2004-06-16 17:45:59,049 INFO [STDOUT] Starting start() sync:service=QueueMonitor
2004-06-16 17:45:59,284 INFO [org.jboss.ejb.EJBDeployer] Deployed: 
file:/D:/jboss-3.2.3/server/default/tmp/deploy/tmp32525Synchrony.ear-contents/SynchronyEJB.jar
2004-06-16 17:45:59,471 ERROR [org.jboss.ejb.plugins.SecurityInterceptor] 
Authentication exception, principal=null
2004-06-16 17:45:59,471 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, 
causedBy:
java.lang.SecurityException: Authentication exception, principal=null
at 
org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:164)
at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:81)
at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)
at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)

Anyone has any sort of solution to this problem please, help me out.

Thanks in advance.

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

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


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Management, JMX/JBoss] - Timer MBean Sample

2004-06-17 Thread bnadesan
Hi All,

Please if possible,  can anyone post a sample of a timer MBean.

Regards...
bnadesan

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

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


---
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Management, JMX/JBoss] - Startup classes deployment.

2004-06-10 Thread bnadesan
Hi,

I have the following questions regarding mbeans/startup classes

1. When I develop a startup class in JBoss, should the startup class be deployed 
separately from the application .ear file, or should it be deployed in a .sar file.

2. If the startup classes are deployed separately can any of those classes have 
references to the classes within the .ear file.

Actually I'm in a learning phase of JBoss and currently using JBoss 3.2.3, Any sort of 
tips regarding these question will be appreciated.

Regards..
Binu Nadesan

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

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


---
This SF.Net email is sponsored by the new InstallShield X.
From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user