Re: [JBoss-user] using the scheduler
Ionel Gardais wrote: Hi, I am trying to use the scheduler. I look into the Timer/Scheduler howto and created two files : a class that hold the job to do in a perform() method and a scheduler-service.xml that containts the following text : ?xml version=1.0 encoding=UTF-8? !DOCTYPE server !-- $Id: scheduler-service.xml,v 1.4 2002/06/01 02:06:46 starksm Exp $ -- server classpath codebase=lib archives=scheduler-plugin.jar, scheduler-plugin-example.jar/ !-- -- !-- Scheduler Service-- !-- -- mbean code=org.jboss.varia.scheduler.Scheduler name=:service=Scheduler attribute name=StartAtStartuptrue/attribute attribute name=SchedulableClassscheduler.struts.Notifier/attribute attribute name=SchedulableArguments/attribute attribute name=SchedulableArgumentTypes/attribute attribute name=InitialStartDate06/11/2003 00:10/attribute attribute name=SchedulePeriod8640/attribute attribute name=InitialRepetitions-1/attribute /mbean /server I package the whole in a file with the following structue : - scheduler struts Notifier.class - META-INF scheduler-service.xml If I pack it in a SAR file, JBoss complains that it did not finf a jboss-service.xml file If I pack it in a JAR file, I got a bunch of exception like : Try to rename your xml decriptor to jboss-service.xml. -marek --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [help please] specifing a role to a scheduled class
Hi, I got the scheduler working, the class I wrote is launched the way I want. The problem is that it access EJB's that are secured by some roles. How to specify the scheduler to run the class using a specific role ? Thank you very much, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] [help please] specifing a role to a scheduled class
Ionel Gardais wrote: Hi, I got the scheduler working, the class I wrote is launched the way I want. The problem is that it access EJB's that are secured by some roles. How to specify the scheduler to run the class using a specific role ? Thank you very much, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user . in ejb-jar.xml adding security-identity run-as role-nameYUORSECROLE/role-name /run-as /security-identity to your session or entity tag ciao, kiuma --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] [help please] specifing a role to a scheduled class
Hi kiuma, thanks for the tip. I am already using this for my facade session bean and the local entities. My problem is that the scheduled class (the one which extends the Schedulable interface) is not an EJB ! It's a basic java object with a perform method and that's all. A solution should be to create all the classes needed for JAAS (a callback handler ...) to create a security context in my class and to log in the server. It looks huge for what I want to do. I thought the Scheduler would provide some security support (such a attribute name=usernamename/attribute and attribute name=passwordpass/attribute in the mbean configuration so the schedulable class will be ran using these credentials. thanks, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Using java.util.Calendar with CMP
I seem to be unable to use a CMP bean that has persistent fields of type java.util.Calendar with a mySQL database. (I am using XDoclet to generate the bean). I can create the bean class and deploy it okay and the table is created with the correct SQL columns. But when I try to create an instance of the bean I get a ClassCastException (see below). I can use a java.util.Date okay but I'm trying to integrate the bean with an Axis service which requires Calendar not Date. I converted the fields to dates and tried to create extra methods in the bean that take/return a calendar object and set/get the date fields but this causes the value objects to fail at compilation as the data object doesn't contain all the methods. Besides I would prefer not to have an extra layer converting between date calendar.Does anyone have any suggestions?2003-06-08 13:05:14,795 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy:javax.ejb.CreateException: Could not create entity:javax.ejb.EJBException: Internal error setting parameters for field test; CausedByException is:Cannot convert class java.util.GregorianCalendar to SQL type requested due to java.lang.ClassCastException - nullat org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.insertEntity(JDBCAbstractVendorCreateCommand.java:136)at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.execute(JDBCAbstractVendorCreateCommand.java:76)at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:569)at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225)at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270)at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:571)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.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998)at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188)at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215)at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88)at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91)at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61)at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28)at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88)at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243)at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74)at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92)at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120)at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93)at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477)at org.jboss.ejb.Container.invoke(Container.java:694)at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:272)at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)at $Proxy40.create(Unknown Source)at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:100)at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:61)snipped/
Re: [JBoss-user] [help please] specifing a role to a scheduled class
Ionel Gardais wrote: Hi kiuma, thanks for the tip. I am already using this for my facade session bean and the local entities. My problem is that the scheduled class (the one which extends the Schedulable interface) is not an EJB ! It's a basic java object with a perform method and that's all. A solution should be to create all the classes needed for JAAS (a callback handler ...) to create a security context in my class and to log in the server. It looks huge for what I want to do. I thought the Scheduler would provide some security support (such a attribute name=usernamename/attribute and attribute name=passwordpass/attribute in the mbean configuration so the schedulable class will be ran using these credentials. thanks, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user . can you wrap that class into an ejb, or use a message bean ? kiuma --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Cascade delete
Hi, We have configured oracle for cascade delete, works fine from doing delete via sqlplus, other clients, but if we do a remove() from an Entity bean, the cascade is not happening. Anyone else experiencing this?, using jboss-3.0.4 Thanks Warren --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] use Tomcat 5.0
Hi, is it possible to integrate Tomcat 5.0 into JBoss 3.2.1, because I want to start evaluating an test new Features in Servlet2.4/JSP2.0 Specifications. Thorsten --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Using java.util.Calendar with CMP
Hello Colin, could you provide the mapping you are using? alex Wednesday, June 11, 2003, 11:34:18 AM, Colin McFarlane wrote: CM I seem to be unable to use a CMP bean that has persistent fields of type java.util.Calendar with a mySQL database. (I am using XDoclet to generate the bean). I can create the bean class and CM deploy it okay and the table is created with the correct SQL columns. But when I try to create an instance of the bean I get a ClassCastException (see below). I can use a java.util.Date okay but CM I'm trying to integrate the bean with an Axis service which requires Calendar not Date. CM I converted the fields to dates and tried to create extra methods in the bean that take/return a calendar object and set/get the date fields but this causes the value objects to fail at CM compilation as the data object doesn't contain all the methods. Besides I would prefer not to have an extra layer converting between date calendar. CM Does anyone have any suggestions? CM 2003-06-08 13:05:14,795 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy: CM javax.ejb.CreateException: Could not create entity:javax.ejb.EJBException: Internal error setting parameters for field test; CausedByException is: CM Cannot convert class java.util.GregorianCalendar to SQL type requested due to java.lang.ClassCastException - null CM at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.insertEntity(JDBCAbstractVendorCreateCommand.java:136) CM at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.execute(JDBCAbstractVendorCreateCommand.java:76) CM at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:569) CM at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225) CM at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270) CM at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:571) CM at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) CM at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) CM at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) CM at java.lang.reflect.Method.invoke(Method.java:324) CM at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998) CM at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) CM at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188) CM at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215) CM at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) CM at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91) CM at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61) CM at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28) CM at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) CM at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243) CM at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74) CM at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92) CM at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) CM at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93) CM at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477) CM at org.jboss.ejb.Container.invoke(Container.java:694) CM at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:272) CM at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110) CM at $Proxy40.create(Unknown Source) CM at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:100) CM at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:61) CM snipped/ --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re[2]: [JBoss-user] Using java.util.Calendar with CMP
We don't support mapping for GregorianCalendar. You should use Date and create GregorianCalendar yourself. alex Wednesday, June 11, 2003, 12:19:39 PM, Alexey Loubyansky wrote: AL Hello Colin, AL could you provide the mapping you are using? AL alex AL Wednesday, June 11, 2003, 11:34:18 AM, Colin McFarlane wrote: CM I seem to be unable to use a CMP bean that has persistent fields of type java.util.Calendar with a mySQL database. (I am using XDoclet to generate the bean). I can create the bean class and CM deploy it okay and the table is created with the correct SQL columns. But when I try to create an instance of the bean I get a ClassCastException (see below). I can use a java.util.Date okay but CM I'm trying to integrate the bean with an Axis service which requires Calendar not Date. CM I converted the fields to dates and tried to create extra methods in the bean that take/return a calendar object and set/get the date fields but this causes the value objects to fail at CM compilation as the data object doesn't contain all the methods. Besides I would prefer not to have an extra layer converting between date calendar. CM Does anyone have any suggestions? CM 2003-06-08 13:05:14,795 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy: CM javax.ejb.CreateException: Could not create entity:javax.ejb.EJBException: Internal error setting parameters for field test; CausedByException is: CM Cannot convert class java.util.GregorianCalendar to SQL type requested due to java.lang.ClassCastException - null CM at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.insertEntity(JDBCAbstractVendorCreateCommand.java:136) CM at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.execute(JDBCAbstractVendorCreateCommand.java:76) CM at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:569) CM at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225) CM at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270) CM at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:571) CM at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) CM at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) CM at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) CM at java.lang.reflect.Method.invoke(Method.java:324) CM at org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998) CM at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) CM at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188) CM at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215) CM at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) CM at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91) CM at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61) CM at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28) CM at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) CM at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243) CM at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74) CM at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92) CM at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) CM at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93) CM at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477) CM at org.jboss.ejb.Container.invoke(Container.java:694) CM at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:272) CM at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110) CM at $Proxy40.create(Unknown Source) CM at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:100) CM at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:61) CM snipped/ --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] [help please] specifing a role to a scheduled class
I should be able to wrap it into a message bean. Is there a way to schedule JMS messages ? if so, I could schedule a kind of perform message that wakes up my MDB so it can process ? thanks, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Using java.util.Calendar with CMP
Colin, The error message is pretty clear. It says it can't convert a Calendar object into a SQL type. So, you need to do this for it. What I would do is make a private CMP field (setter and getter) storing a long in the DB. This long should be the cal.getTime().getTime(). You should provide a public getter and setter, which call the private version. Something like: public abstract long getPrivateTime(); public abstract void setPrivateTime(long timeInMilliseconds); public Calendar getTime() { long t = getPrivateTime(); return new Calendar( new Date( t )); } public void setTime( Calendar cal) { setPrivateTime( cal.getTime().getTime()); } You'll need to set up the XDoclet tags appropriately. Just don't export the privateTime stuff to the local interface class. Ciao, Jonathan O'Connor Development Manager XCOM Dublin Phone: +353 1 872 3305 Mobile: +353 86 824 0736 Colin McFarlane [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 11.06.2003 09:34 Please respond to jboss-user To: [EMAIL PROTECTED] cc: Subject:[JBoss-user] Using java.util.Calendar with CMP I seem to be unable to use a CMP bean that has persistent fields of type java.util.Calendar with a mySQL database. (I am using XDoclet to generate the bean). I can create the bean class and deploy it okay and the table is created with the correct SQL columns. But when I try to create an instance of the bean I get a ClassCastException (see below). I can use a java.util.Date okay but I'm trying to integrate the bean with an Axis service which requires Calendar not Date. I converted the fields to dates and tried to create extra methods in the bean that take/return a calendar object and set/get the date fields but this causes the value objects to fail at compilation as the data object doesn't contain all the methods. Besides I would prefer not to have an extra layer converting between date calendar. Does anyone have any suggestions? 2003-06-08 13:05:14,795 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException, causedBy: javax.ejb.CreateException: Could not create entity:javax.ejb.EJBException: Internal error setting parameters for field test; CausedByException is: Cannot convert class java.util.GregorianCalendar to SQL type requested due to java.lang.ClassCastException - null at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.insertEntity(JDBCAbstractVendorCreateCommand.java:136) at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractVendorCreateCommand.execute(JDBCAbstractVendorCreateCommand.java:76) at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:569) at org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:225) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:270) at org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:571) 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.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:998) at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) at org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:188) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:215) at org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) at org.jboss.ejb.plugins.EntityInstanceInterceptor.invokeHome(EntityInstanceInterceptor.java:91) at org.jboss.ejb.plugins.EntityLockInterceptor.invokeHome(EntityLockInterceptor.java:61) at org.jboss.ejb.plugins.EntityCreationInterceptor.invokeHome(EntityCreationInterceptor.java:28) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:88) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:243) at org.jboss.ejb.plugins.TxInterceptorCMT.invokeHome(TxInterceptorCMT.java:74) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:92) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93) at org.jboss.ejb.EntityContainer.internalInvokeHome(EntityContainer.java:477) at org.jboss.ejb.Container.invoke(Container.java:694) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:272) at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110) at $Proxy40.create(Unknown Source) at com.incito.mirror.ejb.TicketMasterBean.issue(TicketMasterBean.java:100) at
[JBoss-user] AOP schema clarification
I would like to simplify conceptual definition of existent AOP schema, something like(not complete/final): ?xml version=1.0 encoding=UTF-8? xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema; elementFormDefault=qualified attributeFormDefault=unqualified xs:element name=aop type=AopType/ xs:complexType name=AopType xs:annotation xs:documentationadvisable model/xs:documentation /xs:annotation xs:complexContent xs:extension base=StackType xs:sequence xs:element name=interception minOccurs=0 xs:complexType xs:complexContent xs:extension base=StackType xs:attribute ref=class use=required/ /xs:extension /xs:complexContent /xs:complexType /xs:element xs:element name=introduction minOccurs=0 xs:complexType xs:sequence xs:element name=interfaces type=xs:NMTOKENS/ xs:element name=mixin minOccurs=0 xs:complexType xs:attribute ref=class use=required/ xs:attribute name=constructor type=xs:string/ /xs:complexType /xs:element /xs:sequence xs:attribute ref=class use=required/ /xs:complexType /xs:element /xs:sequence /xs:extension /xs:complexContent /xs:complexType xs:complexType name=StackType xs:sequence xs:element name=interceptor minOccurs=0 maxOccurs=unbounded xs:complexType xs:sequence xs:any namespace=##other/ /xs:sequence xs:attribute ref=name/ xs:attribute name=factory type=xs:string/ xs:attribute ref=class/ xs:attribute name=singleton type=xs:boolean/ xs:attribute ref=ref/ /xs:complexType /xs:element xs:element name=stack type=StackType minOccurs=0 maxOccurs=unbounded/ /xs:sequence xs:attribute ref=name/ xs:attribute ref=ref/ /xs:complexType xs:attribute name=class type=xs:string/ xs:attribute name=name type=xs:ID/ xs:attribute name=ref type=xs:IDREF/ /xs:schema Description: 1) ...-pointcut replaced by interception/introduction 2) all schema is build around StackType. 3) some axiliary elements replaced by attributes open schema in XMLSpy schema designer and you'll see differences from http://www.jboss.org/index.html?module=htmlop=userdisplayid=developers/projects/jboss/aop. Any comments? --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] [help please] specifing a role to a scheduled class
Hi ionel! I am new to JBoss and don't know if this is supported, but u can try this: U can specify a security principal (user id) and security credential (passwd) when u create the JNDI InitialContext for looking up the session bean in ur scheduler. The same user can be mapped to the desired role. Thanks, Surajit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ionel Gardais Sent: Wednesday, June 11, 2003 1:22 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] [help please] specifing a role to a scheduled class Hi kiuma, thanks for the tip. I am already using this for my facade session bean and the local entities. My problem is that the scheduled class (the one which extends the Schedulable interface) is not an EJB ! It's a basic java object with a perform method and that's all. A solution should be to create all the classes needed for JAAS (a callback handler ...) to create a security context in my class and to log in the server. It looks huge for what I want to do. I thought the Scheduler would provide some security support (such a attribute name=usernamename/attribute and attribute name=passwordpass/attribute in the mbean configuration so the schedulable class will be ran using these credentials. thanks, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] M$ Soap 3.0 toolkit and JBoss.net interop
Thanks for your reply. I added the parameter and the first time I make the request I get the Authentication error and after that I get an Authorization error. Still looks like M$ is not sending anything after getting the 500 error. Did you managed to get it working? Is it possible that to trigger the sending of data M$ expect the 500 when getting the wsdl on the init call and not on the actual web service call? Thanks Simone - Original Message - From: Jung , Dr. Christoph [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 4:43 PM Subject: AW: [JBoss-user] M$ Soap 3.0 toolkit and JBoss.net interop There was a bug-report on that issue stating that M$ would not send authentication data until faced with a server error (50x or something similar, I think). The JBoss Authentication Handler has been extended with the parameter validateUnauthenticatedCalls !-- authentication runs against the jaas:/other domain -- handler type=java:org.jboss.net.axis.server.JBossAuthenticationHandler parameter name=securityDomain value=java:/jaas/other/ parameter name=validateUnauthenticatedCalls value=false/ /handler This will block any unauthenticated calls from trying to get routed (this is what M$ could first try to do before going the right way). Best, CGJ -Ursprüngliche Nachricht- Von: Simone Milani [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 10. Juni 2003 16:29 An: [EMAIL PROTECTED] Betreff: [JBoss-user] M$ Soap 3.0 toolkit and JBoss.net interop Hi, I am happily using the M$ Soap 3.0 toolkit as a client for JBoss.net. I am now having trouble having the Basic Authentication to work. Has anyone managed to use it? Thanks Simone --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/j boss-user ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com/ --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] [help please] specifing a role to a scheduled class
Surajit Bhattacharjee wrote: Hi ionel! I am new to JBoss and don't know if this is supported, but u can try this: U can specify a security principal (user id) and security credential (passwd) when u create the JNDI InitialContext for looking up the session bean in ur scheduler. The same user can be mapped to the desired role. Thanks, Surajit Hi Surajit, How to specify this ? I find no methods that explcitly set the principal nor the credential. The only supposed method to do so is addToEnvironment() So using addToEnvironement(Context.SECURITY_PRINCIPAL, theusername) and addToEnvironment(Context.SECURITY_CREDENTIALS, thepassword) should do the trick ? Am I on the rigth way ? thanks, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Lookup failing in JBoss3.0.4(with attachment)
Hi Guy, I would like to explain the scenario in more detail. When I perform a lookup to this particular Stateless session bean, it works on all the scenario's except for the error one. I am pasting a debug messages from my log for both the successfull lookup as well as for the error ones Success -- DEBUG 11/Jun/2003 16:58:00 [Thread-36] (HomeReferencesManager.java:249): util.HomeReferencesManager - getContext( Properties env ) Context: [EMAIL PROTECTED] DEBUG 11/Jun/2003 16:58:00 [Thread-36] (Query.java:1732): ejb.Query - jb_007 --- execute() :: queryHome = QuerySessionHome DEBUG 11/Jun/2003 16:58:00 [Thread-36] (Query.java:1734): ejb.Query - jb_007 --- execute() :: queryRemote = QuerySession:Stateless where 'queryHome' and ''queryRemote'' are the Home and Remote interfaces. Error --- ERROR 11/Jun/2003 16:58:30 [Thread-36] (HomeReferencesManager.java:106): util.HomeReferencesManager - Cannot instantiate class: org.jnp.interfaces.NamingContextFactory java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory So as you can see both the scenario occur in the same flow. I.e in successfull the initail context intialization is successfull and the other one ERROR. One doubt is, Is there any bug related to this in JBoss3.0.4? Reason for the doubt being I upgraded to JBoss3.0.4 from 3.0 because of one bug in the transaction race condition(suggested by Adrian). Thanks Muraly At 15:15 10/06/2003 -0400, you wrote: Well, if jnp-client.jar were actually on the classpath when this code is executed, you wouldn't be getting this exception. How are you identifying the classpath used at this time? To help trace this down, find a scenario that you know is failing. Then, before doing the lookup, print out the classpath being used - you should be able to do a getProperty(java.classpath) or something like that. Hopefully, the value of the classpath at that moment will provide a clue as to where it is getting incorrectly set. Muraly R wrote: Sorry, this time with stack trace attached...:-) -M At 14:22 10/06/2003 +0530, you wrote: Hi Gurus, I am actually stuck with this error scenario. The flow for the scenario is there is lookup portion in my client code(i.e tomcat separate installation), which looks up JBoss server(3.0.4) for a session bean. This works fine, except in some scenario's the following error is thrown: ERROR 10/Jun/2003 13:49:13 [Thread-34] (HomeReferencesManager.java:106): util.HomeReferencesManager - Cannot instantiate class: org.jnp.interfaces.NamingContextFactory java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory I have jnp-client.jar in the client classpath. Have any one encountered this scenario before? Please share your thoughts on the same. The most confusing(irritating actaully) part is, the same bean lookup from the same code snippet location works fine in some scenarios. Thanks Muraly --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com http://www.etnus.com/. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ERROR 10/Jun/2003 13:49:13 [Thread-34] (HomeReferencesManager.java:106): util.HomeReferencesManager - Cannot instantiate class: org.jnp.interfaces.NamingContextFactory java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.net.FactoryURLClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.sun.naming.internal.VersionHelper12.loadClass(Unknown Source) at javax.naming.spi.NamingManager.getInitialContext(Unknown Source) at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at javax.naming.InitialContext.init(Unknown Source) at com.cisco.nm.qpm.server.util.HomeReferencesManager.getContext(HomeReferencesManager.java:248) at com.cisco.nm.qpm.server.util.HomeReferencesManager.getHome(HomeReferencesManager.java:100) at com.cisco.nm.qpm.server.inventory.ejb.Query.execute(Query.java:1728) at com.cisco.nm.qpm.web.util.grid.DataGrid.work(DataGrid.java:189) at com.cisco.nm.qpm.web.util.grid.DataGrid.init(DataGrid.java:103) at policy.group.NetworkElementSelection_1._jspService(NetworkElementSelection_1.java:909) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at
Re: [JBoss-user] Cascade delete
We just figured this one out, but we are using 3.2.0. The foregin key in the child table was defined as NOT NULL and JBoss was trying to set it to null so it was failing right there. Once we set it to NULLABLE, it appears that JBoss sets the foregin keys to null, then deletes them. I am sure there is an explanation as to why it works this way, but it does work as desired. //Nicholas --- Warren Mira [EMAIL PROTECTED] wrote: Hi, We have configured oracle for cascade delete, works fine from doing delete via sqlplus, other clients, but if we do a remove() from an Entity bean, the cascade is not happening. Anyone else experiencing this?, using jboss-3.0.4 Thanks Warren --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user = Nicholas Whitehead Home: (973) 377 9335 Cell: (201) 615 2716 [EMAIL PROTECTED] Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/ --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] E/A-Exception during JMS action with OracleDB
Hi, I can't figure out what causes the following error. This happens when a huge amount of data is written to a JMS queue. It occurs regularly in the logs. The exception always causes an ORA-600 error in the Oracle database: 2003-06-11 11:59:19,727 DEBUG [org.jboss.resource.adapter.jms.JmsSession] Closing session 2003-06-11 11:59:19,727 DEBUG [org.jboss.resource.adapter.jms.JmsManagedConnection] Sending connection event: 1 2003-06-11 11:59:20,065 INFO [org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener] Unregistered handle that was not registered ! null for managedConnection: [EMAIL PROTECTED] 2003-06-11 11:59:20,066 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] ResourceException cleaning up ManagedConnection:org.jboss.reso urce.JBossResourceException: Could not cleanup: ; - nested throwable: (java.sql.SQLException: E/A-Exception: Broken pipe) 2003-06-11 11:59:20,067 INFO [org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener] Unregistered handle that was not registered ! null for managedConnection: [EMAIL PROTECTED] 2003-06-11 11:59:20,068 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Exception destroying ManagedConnection org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: E/A-Exception: Broken pipe) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:445) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWrapperManagedConnection.java:229) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy(InternalManagedConnectionPool.java:374) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnConnection(InternalManagedConnectionPool.java:250) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.returnConnection(JBossManagedConnectionPool.java:653) at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedConnection(BaseConnectionManager2.java:451) at org.jboss.resource.connectionmanager.BaseConnectionManager2$BaseConnectionEventListener.connectionErrorOccurred(BaseConnectionManager2.java:762) at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.connectionErrorOccurred(TxConnectionManager.java:629) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.broadcastConnectionError(BaseWrapperManagedConnection.java:309) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.connectionError(BaseWrapperManagedConnection.java:294) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException(BaseWrapperManagedConnection.java:444) at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalManagedConnection.java:95) at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.commit(TxConnectionManager.java:773) at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1580) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:366) at org.jboss.mq.pm.jdbc2.PersistenceManager$TransactionManagerStrategy.endTX(PersistenceManager.java:183) at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:696) at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:39) at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:124) at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.java:404) at org.jboss.mq.server.JMSDestinationManager.transact(JMSDestinationManager.java:430) at org.jboss.mq.server.JMSServerInterceptorSupport.transact(JMSServerInterceptorSupport.java:185) at org.jboss.mq.server.TracingInterceptor.transact(TracingInterceptor.java:370) at org.jboss.mq.server.JMSServerInvoker.transact(JMSServerInvoker.java:187) at org.jboss.mq.il.jvm.JVMServerIL.transact(JVMServerIL.java:328) at org.jboss.mq.Connection.send(Connection.java:928) at org.jboss.mq.SpyXAResourceManager.commit(SpyXAResourceManager.java:127) at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:103) at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1580) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:366) at org.jboss.ejb.plugins.TxInterceptorCMT.endTransaction(TxInterceptorCMT.java:369) at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:253) at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:104) at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:117) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
Re[2]: [JBoss-user] Cascade delete
Hello Nicholas, if you have NOT NULL foreign keys and want to use cascade-delete, you should use a custom container configuration with sync-on-commit-only set true: container-configurations container-configuration extends=Standard CMP 2.x EntityBean container-nameSync On Commit Only CMP2.x Container/container-name sync-on-commit-onlytrue/sync-on-commit-only /container-configuration /container-configurations alex Wednesday, June 11, 2003, 3:58:10 PM, Nicholas Nicholas wrote: N We just figured this one out, but we are using 3.2.0. N The foregin key in the child table was defined as NOT N NULL and JBoss was trying to set it to null so it was N failing right there. N Once we set it to NULLABLE, it appears that JBoss sets N the foregin keys to null, then deletes them. I am sure N there is an explanation as to why it works this way, N but it does work as desired. N //Nicholas N --- Warren Mira [EMAIL PROTECTED] wrote: Hi, We have configured oracle for cascade delete, works fine from doing delete via sqlplus, other clients, but if we do a remove() from an Entity bean, the cascade is not happening. Anyone else experiencing this?, using jboss-3.0.4 Thanks Warren --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Jboss 4.0 UDDI repository
Hi, I've seen and uddi repository included in JBoss 4.0. As I am interested in registering my webservices with it, is there any documentation available? any examples?, I've seen juddi.jar and uddi4j.jar in java.net.sar, which one is used? and, what for? Greets, Alberto Rodriguez Galdo [EMAIL PROTECTED]
[JBoss-user] jBoss 4.0 DR2 Release?
According to the jBoss website DR2 is supposed to be released sometime today. Is this plan still on track? When is the released scheduled for?Edward FlickEnterprise Applications Designer / Database Administrator / Web AdministratorCDF, Inc. Do you Yahoo!? Free online calendar with sync to Outlook(TM).
Re: [JBoss-user] E/A-Exception during JMS action with OracleDB
Are you using oci drivers for oracle? If not, then use them because the thin drivers have problems with large amounts of data.. - Original Message - From: Marek Lange [EMAIL PROTECTED] To: JBoss User [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 3:22 PM Subject: [JBoss-user] E/A-Exception during JMS action with OracleDB Hi, I can't figure out what causes the following error. This happens when a huge amount of data is written to a JMS queue. It occurs regularly in the logs. The exception always causes an ORA-600 error in the Oracle database: 2003-06-11 11:59:19,727 DEBUG [org.jboss.resource.adapter.jms.JmsSession] Closing session 2003-06-11 11:59:19,727 DEBUG [org.jboss.resource.adapter.jms.JmsManagedConnection] Sending connection event: 1 2003-06-11 11:59:20,065 INFO [org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventL istener] Unregistered handle that was not registered ! null for managedConnection: [EMAIL PROTECTED] 2003-06-11 11:59:20,066 WARN [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] ResourceException cleaning up ManagedConnection:org.jboss.reso urce.JBossResourceException: Could not cleanup: ; - nested throwable: (java.sql.SQLException: E/A-Exception: Broken pipe) 2003-06-11 11:59:20,067 INFO [org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventL istener] Unregistered handle that was not registered ! null for managedConnection: [EMAIL PROTECTED] 2003-06-11 11:59:20,068 INFO [org.jboss.resource.connectionmanager.JBossManagedConnectionPool] Exception destroying ManagedConnection org.jboss.resource.JBossResourceException: SQLException; - nested throwable: (java.sql.SQLException: E/A-Exception: Broken pipe) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException( BaseWrapperManagedConnection.java:445) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.destroy(BaseWra pperManagedConnection.java:229) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.doDestroy (InternalManagedConnectionPool.java:374) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.returnCon nection(InternalManagedConnectionPool.java:250) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$OnePool.retu rnConnection(JBossManagedConnectionPool.java:653) at org.jboss.resource.connectionmanager.BaseConnectionManager2.returnManagedCon nection(BaseConnectionManager2.java:451) at org.jboss.resource.connectionmanager.BaseConnectionManager2$BaseConnectionEv entListener.connectionErrorOccurred(BaseConnectionManager2.java:762) at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventLi stener.connectionErrorOccurred(TxConnectionManager.java:629) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.broadcastConnec tionError(BaseWrapperManagedConnection.java:309) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.connectionError (BaseWrapperManagedConnection.java:294) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkException( BaseWrapperManagedConnection.java:444) at org.jboss.resource.adapter.jdbc.local.LocalManagedConnection.commit(LocalMan agedConnection.java:95) at org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource.com mit(TxConnectionManager.java:773) at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1580) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:366) at org.jboss.mq.pm.jdbc2.PersistenceManager$TransactionManagerStrategy.endTX(Pe rsistenceManager.java:183) at org.jboss.mq.pm.jdbc2.PersistenceManager.add(PersistenceManager.java:696) at org.jboss.mq.server.PersistentQueue.addMessage(PersistentQueue.java:39) at org.jboss.mq.server.JMSQueue.addMessage(JMSQueue.java:124) at org.jboss.mq.server.JMSDestinationManager.addMessage(JMSDestinationManager.j ava:404) at org.jboss.mq.server.JMSDestinationManager.transact(JMSDestinationManager.jav a:430) at org.jboss.mq.server.JMSServerInterceptorSupport.transact(JMSServerIntercepto rSupport.java:185) at org.jboss.mq.server.TracingInterceptor.transact(TracingInterceptor.java:370) at org.jboss.mq.server.JMSServerInvoker.transact(JMSServerInvoker.java:187) at org.jboss.mq.il.jvm.JVMServerIL.transact(JVMServerIL.java:328) at org.jboss.mq.Connection.send(Connection.java:928) at org.jboss.mq.SpyXAResourceManager.commit(SpyXAResourceManager.java:127) at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:103) at org.jboss.tm.TransactionImpl.commitResources(TransactionImpl.java:1580) at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:366) at
[JBoss-user] Notifications for deploying/undeploying?
Hi, Is it possible to get notifications when modules are deployed/undeployed? I would like to write a JBoss 3.3 add-on that does 'something' when for example a web app is deployed/undeployed. Is this possible with a JMX component? S. --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Looking for documentation-example.zip
Hi, I'm going through the online documentation manual of JBoss (2.4+) but I couldn't get any link to download the documentation-example.zip Any pointers? Thanks, Sanjeev Chakravarty --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Best practice for data-based authorization?
Hi Scott, Scott M Stark [EMAIL PROTECTED] writes: Filters are logically equivalent to the ejb interceptors on which the security proxy is based. I'm hip to using a filter, but does it make sense to obtain, continuing the example below, the customer ID from the authenticated Subject, as some type of Credential maybe? What would be involved to make that happen -- would I have to write my own LoginModule? Thanks, Jim On Friday, May 2, 2003, at 08:08 AM, Jim Crossley wrote: Hi, I'm sure other people have solved this problem, but I can't find any applicable solutions in the forums/archives. The J2EE role-based authorization model doesn't seem to address the problem of say, preventing a user in the customer role from seeing customer data other than his own. I understand the SecurityProxy class was designed to help with this, but I'm looking for something I could use in a servlet instead of an EJB. Any suggestions are welcome! Jim --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] MBeanServer.queryNames() not working
Title: Message I justtried that and it didn't work. When you say "the standard mbean naming convention", to what are you referring? The JBoss deployment files all use lowercase for MBean ObjectName property names. The examples in Juha and Mark's JMX book also use lowercase. Are you saying that JBoss's JMX implementationuppercases the first letter of ObjectName property names somewhere along the line? -Original Message-From: Scott M Stark [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 8:54 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] MBeanServer.queryNames() not working The "name" attribute should be "Name" to match the standard mbean naming convention. Scott StarkChief Technology OfficerJBoss Group, LLC - Original Message - From: Callies, Peter To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 7:01 AM Subject: [JBoss-user] MBeanServer.queryNames() not working If it's user error, I hope someone can point it out to me. I'm using version 3.0.6. I have one MBean that is attempting to use MBeanServer.queryNames() to look up other MBeans. However, queryNames() is returning an empty Set. Here's the code: QueryExp nameExp = Query.match(Query.attr("name"), Query.value("XTFResource")); QueryExp exp = nameExp; ObjectName scope = new ObjectName("tsh:*"); logger.debug("Query _expression_="+ exp); logger.debug("Scope="+ scope); ArrayList mbeanServers = MBeanServerFactory.findMBeanServer(null); Iterator iter = mbeanServers.iterator(); while (iter.hasNext()) { MBeanServer mbeanServer = (MBeanServer) iter.next(); Set names = mbeanServer.queryNames(scope, exp); logger.debug("Found XTFResources: " + names); The logging output is: Query _expression_=(name matches XTFResource) Scope=tsh:* When I ran the method, the following MBean was registered, but queryNames did not return it. Domain Name: tsh name: XTFResource
[JBoss-user] 4.0 web console error
While browsing the web-console and viewing one of my jars, I received this error: org.apache.jasper.JasperException: Unable to compile class for JSP An error occurred at line: 2 in the jsp file: /EntityEjb.jsp Generated servlet error: [javac] Since fork is true, ignoring compiler setting. [javac] Compiling 1 source file [javac] Since fork is true, ignoring compiler setting. [javac] /usr/local/jboss/tomcat-4.1.x/work/MainEngine/localhost/web-console/EntityEjb_jsp.java:106: cannot resolve symbol [javac] symbol : class ContainerMBean [javac] location: package ejb [javac] org.jboss.ejb.ContainerMBean container = null; [javac]^ An error occurred at line: 2 in the jsp file: /EntityEjb.jsp Generated servlet error: [javac] /usr/local/jboss/tomcat-4.1.x/work/MainEngine/localhost/web-console/EntityEjb_jsp.java:107: cannot resolve symbol [javac] symbol : class ContainerMBean [javac] location: package ejb [javac] container = (org.jboss.ejb.ContainerMBean) pageContext.findAttribute(container); [javac] ^ [javac] 2 errors Just wanted to report it... :) --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Configuring Minimal Server for JAAS
I am trying to add the minimal necessary modules to the minimal JBoss configuration (3.2.0). I added my login-cong.xml to conf and a datasource XML to deploy, but when I run my code, I get a: java.lang.SecurityException: Unable to locate a login configuration What am I missing here ? Thanks. //Nicholas --- Alexey Loubyansky [EMAIL PROTECTED] wrote: Hello Nicholas, if you have NOT NULL foreign keys and want to use cascade-delete, you should use a custom container configuration with sync-on-commit-only set true: container-configurations container-configuration extends=Standard CMP 2.x EntityBean container-nameSync On Commit Only CMP2.x Container/container-name sync-on-commit-onlytrue/sync-on-commit-only /container-configuration /container-configurations alex Wednesday, June 11, 2003, 3:58:10 PM, Nicholas Nicholas wrote: N We just figured this one out, but we are using 3.2.0. N The foregin key in the child table was defined as NOT N NULL and JBoss was trying to set it to null so it was N failing right there. N Once we set it to NULLABLE, it appears that JBoss sets N the foregin keys to null, then deletes them. I am sure N there is an explanation as to why it works this way, N but it does work as desired. N //Nicholas N --- Warren Mira [EMAIL PROTECTED] wrote: Hi, We have configured oracle for cascade delete, works fine from doing delete via sqlplus, other clients, but if we do a remove() from an Entity bean, the cascade is not happening. Anyone else experiencing this?, using jboss-3.0.4 Thanks Warren --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user = Nicholas Whitehead Home: (973) 377 9335 Cell: (201) 615 2716 [EMAIL PROTECTED] Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/ --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] @jboss-net:xml-schema
This looks like a problem with your client. Does your request (you might have to use tcpmon, or wade through your server log to see the xml of the request) have an xml element that has xmlns:tns1= in it somewhere? -jason On Tuesday, June 10, 2003, at 12:47 PM, Felipe Oliveira wrote: First of all, thank you very much Jason! The webservices get deployed fine now but I am getting an WSDLException when I call any method. Any ideas? Could it be my IBM jvm? Probabily not...just wondering Caused by: WSDLException: faultCode=PARSER_ERROR: Problem parsing '- WSDL Document -'.: The value of the attribute xmlns:tns1 is invalid. Prefixed namespace bindings may not be empty.: org.xml.sax.SAXParseException: The value of the attribute xmlns:tns1 is invalid. Prefixed namespace bindings may not be empty. at org.apache.xerces.parsers.DOMParser.parse(DOMParser.java:235) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.ja va:209) at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source) at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:236) at org.apache.axis.providers.java.JavaProvider.generateWSDL(JavaProvider.j ava:418)at org.jboss.net.axis.server.EJBProvider.generateWSDL(EJBProvider.java:243 ) at org.apache.axis.strategies.WSDLGenStrategy.visit(WSDLGenStrategy.java:7 2) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156) at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:143) at org.apache.axis.handlers.soap.SOAPService.generateWSDL(SOAPService.java :355) at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:490) at org.apache.axis.transport.http.AxisServlet.processWsdlRequest(AxisServl et.java:428) at org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:280) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase. java:335) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplication Handler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558 ) at org.mortbay.http.HttpContext.handle(HttpContext.java:1714) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCo ntext.java:507) at org.mortbay.http.HttpContext.handle(HttpContext.java:1664) at org.mortbay.http.HttpServer.service(HttpServer.java:863) at org.jboss.jetty.Jetty.service(Jetty.java:460) at org.mortbay.http.HttpConnection.service(HttpConnection.java:775) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:20 1) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455) at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source) at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source) at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:236) --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1]
I tried with your code, Guy. Anyway, I'm trying to getting a Jboss Mail Session from a class running under Tomcat (running as separate bundle), therefore I don't bind the resource-ref element to any session or entity bean. What I would like is just to retrieve a Mail Session Object from JBoss and to use it, instead of implementing (as I've done) it on my own. I tried your code, but I obtain the following exception (the first part is customized): NamingException while getting the Jboss Mail Session: Mail not bound The InitialContext object has been set correctly, as I manage entity and session bean successfully. If you don't have time to follow this issue, just leave it, I'm happy with the service I implemented under Tomcat right now, but if I could use Jboss I would be happier. Marco - Original Message - From: Guy Rouillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 5:07 AM Subject: Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1] Here is what I did under 2.4.3. The same thing should work in 3.2.1, as I see mail-service.xml is in the default server. Check your server (either the logs or jmx-console) to make sure the mail service has started properly. Source: Session session = ((Session) new InitialContext().lookup(java:comp/env/mail/Mail)); ejb-jar.xml: resource-ref descriptionA mail session for the Email bean/description res-ref-namemail/Mail/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref jboss.xml: resource-managers resource-manager res-jndi-namejava:/Mail/res-jndi-name res-namemail/Mail/res-name /resource-manager /resource-managers Marco Tedone wrote: Hi, I would like to retrieve a javax.mail.Session object from within a class running under Tomcat. I would like to user the javax.mail.Session provided by Jboss. In the jmx-console, I can see that under the java Namespace there is the 'Mail' name; however, from within my class, when I do the following: //setJbossProperties() returns a Properties object set for Jboss. It works as another class uses it and my entity/session //beans work greatly InitialContext context = new InitialContext(JbossService.newInstance().setJbossProperties()); //jndiName contains java:comp/env/Mail Object node = context.lookup(jndiName); session = (Session)PortableRemoteObject.narrow(node, Session.class); I receive the following exception: ERROR 09 Jun 2003 22:37:41,859 framework.MailService -- NamingException while creating a JavaMail Session: comp not bound or, if I set jndiName with java:/Mail ERROR 09 Jun 2003 22:37:41,859 framework.MailService -- NamingException while creating a JavaMail Session: Mail not bound I also tried simply with the following: InitialContext context = new InitialContext(JbossService.newInstance().setJbossProperties()); session = (Session)context.lookup(jndiName); Two questions: 1) Is it possible from an external class (let's say under Tomcat) to retrieve a Session object by simply lookup the Jboss JNDI namespace? 2) Is the source I wrote correct? Thanks for any help, Marco --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Guy Rouillier --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Jetty OutOfMemoryError
A bug fix in the StringBuffer in 1.4.0 (carried into 1.4.1) triggered a memory leak bug. Basically, reusing a StringBuffer kept allocating fresh memory for the new contents, but did not release old memory. Certain Servlet containers, including (but most definately NOT limited to Jetty) relied very heavily on the freshly broken object, as they use StringBuffers to put together the HTML reponses. This has been fixed, but I think only for the 1.4.2 (and maybe the latest 1.4.1). Search the BugParade for closed StringBuffer Memory Leak bugs. Regards, Steve Hunter Hillegas wrote: Yeah... I watched the java process go from 256MB to 512MB to 1.5GB of used memory and then crash... Reverting back to 1.4.0 saved us... 1.4.2 fixes a couple of bad memory leaks so I'm hoping that will let us move forward again. From: Bill Burke [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Thu, 5 Jun 2003 16:54:23 -0400 To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Jetty OutOfMemoryError Seriously? I've been on 1.4.1_02 for awhile on Linux RH8. Seems ok. Of course, I'm just doing development and testing on it, although I did run ECPerf once. Bill -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Hunter Hillegas Sent: Thursday, June 05, 2003 2:04 PM To: JBoss User Subject: Re: [JBoss-user] Jetty OutOfMemoryError Running on Linux? Try 1.4.0_x We had problems with 1.4.1. From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Thu, 5 Jun 2003 19:22:23 +0200 (CEST) To: [EMAIL PROTECTED] Subject: [JBoss-user] Jetty OutOfMemoryError Hi, I am taking some pressure on a web app which is running under JBoss3.2.0/Jetty???. I can reproduce the following error: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start(Native Method) at org.mortbay.util.ThreadPool$PoolThread.enterPool(ThreadPool.java:385) at org.mortbay.util.Pool.newPondLife(Pool.java:339) at org.mortbay.util.Pool.get(Pool.java:276) at org.mortbay.util.ThreadPool.run(ThreadPool.java:319) at org.mortbay.util.ThreadedServer$Acceptor.run(ThreadedServer.java:515) 19:17:58,900 WARN [jbossweb] WARNING: Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] This happens at once if the pressure test is started. The JVM memory should be ok since Xmx and Xms params are initialized with 512MB and 1024MB. I checked JDK1.4.1_01 and JDK1.4.1_03. I also checked the Jetty version shipped with 3.2.1. Same errors. Does Jetty have a memory leak here? Thanks, -marek -- Java/J2EE Developer/Integrator 214-724-7741 --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] MBeans and EJB's
Hi, I have a problem, and the solution seems to be an MBean, but I need to call/use both remote and local EJB's (SLS). Now I have a couple of JMX books, a number of JMX articles, but none of them contain an example of using/calling EJB's within an MBean. It works, as I have tried it, but should I be doing it? Phil -- 9:07pm up 56 days, 10:00, 1 user, load average: 0.15, 0.06, 0.01 ICQ: 760757 AIM: pjshrimpton Y!: pjshrimpton --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1]
When you say Tomcat running as a separate bundle, I'm taking that to mean in a different JVM. If so, I don't think you can just look it up. The Mail service is an MBean, not an EJB. You might be able to get a handle to the MBeanServer, and locate the MBean that way. Marco Tedone wrote: I tried with your code, Guy. Anyway, I'm trying to getting a Jboss Mail Session from a class running under Tomcat (running as separate bundle), therefore I don't bind the resource-ref element to any session or entity bean. What I would like is just to retrieve a Mail Session Object from JBoss and to use it, instead of implementing (as I've done) it on my own. I tried your code, but I obtain the following exception (the first part is customized): NamingException while getting the Jboss Mail Session: Mail not bound The InitialContext object has been set correctly, as I manage entity and session bean successfully. If you don't have time to follow this issue, just leave it, I'm happy with the service I implemented under Tomcat right now, but if I could use Jboss I would be happier. Marco - Original Message - From: Guy Rouillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 5:07 AM Subject: Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1] Here is what I did under 2.4.3. The same thing should work in 3.2.1, as I see mail-service.xml is in the default server. Check your server (either the logs or jmx-console) to make sure the mail service has started properly. Source: Session session = ((Session) new InitialContext().lookup(java:comp/env/mail/Mail)); ejb-jar.xml: resource-ref descriptionA mail session for the Email bean/description res-ref-namemail/Mail/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref jboss.xml: resource-managers resource-manager res-jndi-namejava:/Mail/res-jndi-name res-namemail/Mail/res-name /resource-manager /resource-managers Marco Tedone wrote: Hi, I would like to retrieve a javax.mail.Session object from within a class running under Tomcat. I would like to user the javax.mail.Session provided by Jboss. In the jmx-console, I can see that under the java Namespace there is the 'Mail' name; however, from within my class, when I do the following: //setJbossProperties() returns a Properties object set for Jboss. It works as another class uses it and my entity/session //beans work greatly InitialContext context = new InitialContext(JbossService.newInstance().setJbossProperties()); //jndiName contains java:comp/env/Mail Object node = context.lookup(jndiName); session = (Session)PortableRemoteObject.narrow(node, Session.class); I receive the following exception: ERROR 09 Jun 2003 22:37:41,859 framework.MailService -- NamingException while creating a JavaMail Session: comp not bound or, if I set jndiName with java:/Mail ERROR 09 Jun 2003 22:37:41,859 framework.MailService -- NamingException while creating a JavaMail Session: Mail not bound I also tried simply with the following: InitialContext context = new InitialContext(JbossService.newInstance().setJbossProperties()); session = (Session)context.lookup(jndiName); Two questions: 1) Is it possible from an external class (let's say under Tomcat) to retrieve a Session object by simply lookup the Jboss JNDI namespace? 2) Is the source I wrote correct? Thanks for any help, Marco --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Guy Rouillier --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Guy Rouillier --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1]
Yes, I'm referring as a separate JVM. Thank you for your reply, I won't get a reference to the MBeanServer. Marco - Original Message - From: Guy Rouillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, June 11, 2003 10:26 PM Subject: Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1] When you say Tomcat running as a separate bundle, I'm taking that to mean in a different JVM. If so, I don't think you can just look it up. The Mail service is an MBean, not an EJB. You might be able to get a handle to the MBeanServer, and locate the MBean that way. Marco Tedone wrote: I tried with your code, Guy. Anyway, I'm trying to getting a Jboss Mail Session from a class running under Tomcat (running as separate bundle), therefore I don't bind the resource-ref element to any session or entity bean. What I would like is just to retrieve a Mail Session Object from JBoss and to use it, instead of implementing (as I've done) it on my own. I tried your code, but I obtain the following exception (the first part is customized): NamingException while getting the Jboss Mail Session: Mail not bound The InitialContext object has been set correctly, as I manage entity and session bean successfully. If you don't have time to follow this issue, just leave it, I'm happy with the service I implemented under Tomcat right now, but if I could use Jboss I would be happier. Marco - Original Message - From: Guy Rouillier [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, June 10, 2003 5:07 AM Subject: Re: [JBoss-user] Retrieving a mail session object from Jboss [3.2.1] Here is what I did under 2.4.3. The same thing should work in 3.2.1, as I see mail-service.xml is in the default server. Check your server (either the logs or jmx-console) to make sure the mail service has started properly. Source: Session session = ((Session) new InitialContext().lookup(java:comp/env/mail/Mail)); ejb-jar.xml: resource-ref descriptionA mail session for the Email bean/description res-ref-namemail/Mail/res-ref-name res-typejavax.mail.Session/res-type res-authContainer/res-auth /resource-ref jboss.xml: resource-managers resource-manager res-jndi-namejava:/Mail/res-jndi-name res-namemail/Mail/res-name /resource-manager /resource-managers Marco Tedone wrote: Hi, I would like to retrieve a javax.mail.Session object from within a class running under Tomcat. I would like to user the javax.mail.Session provided by Jboss. In the jmx-console, I can see that under the java Namespace there is the 'Mail' name; however, from within my class, when I do the following: //setJbossProperties() returns a Properties object set for Jboss. It works as another class uses it and my entity/session //beans work greatly InitialContext context = new InitialContext(JbossService.newInstance().setJbossProperties()); //jndiName contains java:comp/env/Mail Object node = context.lookup(jndiName); session = (Session)PortableRemoteObject.narrow(node, Session.class); I receive the following exception: ERROR 09 Jun 2003 22:37:41,859 framework.MailService -- NamingException while creating a JavaMail Session: comp not bound or, if I set jndiName with java:/Mail ERROR 09 Jun 2003 22:37:41,859 framework.MailService -- NamingException while creating a JavaMail Session: Mail not bound I also tried simply with the following: InitialContext context = new InitialContext(JbossService.newInstance().setJbossProperties()); session = (Session)context.lookup(jndiName); Two questions: 1) Is it possible from an external class (let's say under Tomcat) to retrieve a Session object by simply lookup the Jboss JNDI namespace? 2) Is the source I wrote correct? Thanks for any help, Marco --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user -- Guy Rouillier --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here:
Re: [JBoss-user] MBeans and EJB's
Phil == Phil Shrimpton [EMAIL PROTECTED] writes: Phil Hi, I have a problem, and the solution seems to be an MBean, Phil but I need to call/use both remote and local EJB's (SLS). Phil Now I have a couple of JMX books, a number of JMX articles, Phil but none of them contain an example of using/calling EJB's Phil within an MBean. Phil It works, as I have tried it, but should I be doing it? Sure, why not? An MBean is just another java client with some fancy deploy and management stuff. We do it all the time. -Bob -- SynXis Corporation | [EMAIL PROTECTED]| no .sig today. 1610 Wynkoop, Suite 400 | Ph: (303)595-2511 | Denver, CO 80202 | Fax:(303)534-4257 | --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Notifications for deploying/undeploying?
Yes it is possible. The wonders of JMX! You may what to look at the farm service, I think it does something simmilar. Regards, Hirma Stefan Arentz wrote: Hi, Is it possible to get notifications when modules are deployed/undeployed? I would like to write a JBoss 3.3 add-on that does 'something' when for example a web app is deployed/undeployed. Is this possible with a JMX component? S. --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] Notifications for deploying/undeploying?
On Thu, 12 Jun 2003 00:52, Stefan Arentz wrote: Hi, Is it possible to get notifications when modules are deployed/undeployed? I would like to write a JBoss 3.3 add-on that does 'something' when for example a web app is deployed/undeployed. Is this possible with a JMX component? Yes. You can get JMX notifications on registration and de-registration of MBeans which of course underly all your other components. See MBean Server Notifications on page 128 of the JMX 1.2 spec. Unfortunatly I don't have an example (I had one but it has since been removed from our system). It's not hard to code/use. brian wallis... --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] [help please] specifing a role to a scheduled class
Hi ionel! Yes, that is what I intended to suggest. Give it a shot and good luck! Surajit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Ionel Gardais Sent: Wednesday, June 11, 2003 5:08 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] [help please] specifing a role to a scheduled class Surajit Bhattacharjee wrote: Hi ionel! I am new to JBoss and don't know if this is supported, but u can try this: U can specify a security principal (user id) and security credential (passwd) when u create the JNDI InitialContext for looking up the session bean in ur scheduler. The same user can be mapped to the desired role. Thanks, Surajit Hi Surajit, How to specify this ? I find no methods that explcitly set the principal nor the credential. The only supposed method to do so is addToEnvironment() So using addToEnvironement(Context.SECURITY_PRINCIPAL, theusername) and addToEnvironment(Context.SECURITY_CREDENTIALS, thepassword) should do the trick ? Am I on the rigth way ? thanks, ionel --- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user