[JBoss-user] [EJB 3.0] - Re: How to specify default values for attributes in service
I'm interested in this as well, but so far I haven't found a way. The JBoss J2EE deployment descriptor XSD which includes the POJO Service deployement descriptor does not seem to allow for arbitrary management properties, however. I also tried the using a -service.xml file as describe in this thread, but there was no magic - I ended up w/ a ordinary MBean, but the EJB didn't get deployed. Seems like this is needed. I really like how this ties together the actual service w/ the mgmt interface, but without the attributes I can't use it in a lot of places. Shall I put in a request via JIRA or is there something we're not seeing? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3955676#3955676 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3955676 Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Turning off Second Level cach w/ HibernateMBean
JBoss 4.0.3 SP1, Hibernate 3.1 In a single har I have two instances of the JBoss Hibernate MBean sharing the same set of mapping files. I use the two SessionFactories to replicate data between a remote DB and a local DB. I'd like to be able to turn off second level caching for the remote DB SessionFactory but leave it on for the other. Does the Hibernate MBean support this? I see it in the API (SecondLevelCacheEnabled), but it doesn't appear to be respected. Is there a better way to do this than have to set the CacheMode on every Session I get back from this SessionFactory? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3951101#3951101 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3951101 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Help w/ TransactionAttributeType.REQUIRES_NEW
Thanks for the discussion - it's been very helpful coming up to speed on this... In the case of a same EJB call, is there any difference between doing A) @EJB SameEJB same; vs: B) @Resource SessionContext ctx; ... SameEJB same = ctx.getBusinessObject(); I'm guessing in B) you get a local if you're working w/ a local intf, vice versa. How does @EJB deal w/ local deal w/ that? -Dan View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949624#3949624 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949624 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Re: Help w/ TransactionAttributeType.REQUIRES_NEW
I tried calling SessionContext.getBusinessObject() and also SessionContext.getInvokedBusinessInterface() from a SLSB method. However, I get an IllegalStateException - Not Implemented. (aside: any reason to not to call getInvokedBusinessInterface() vs getBusinessObject()? It seems simpler to not have to pass in the interface) @Stateless | public class FooBean implements FooLocal { | | @Resource SessionContext ctx; | public static Logger log = Logger.getLogger( FooBean ); | | public void doSomething() { | log.info( doSomething: enter); | | //Foo thisFoo = (Foo)ctx.getBusinessObject( FooLocal.class ); | Foo thisFoo = (Foo)ctx.getInvokedBusinessInterface(); | | log.info( got business interface: + thisFoo ); | } | } I see the enter log message, but nothing after. I guess there are two choices - either I'm not using this correctly or it's really not implemented. Bill - should this work w/ RC7? If not, would we expect this for a GA release of EJB3? As to using the JBoss AOP @Tx mixed w/ EJB3 syntax, I don't think I can sell that to our group. It seems messy to adopt EJB3 only to sprinkle in a proprietary syntax to get the desired to our group. Thanks, -Dan View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949688#3949688 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949688 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [EJB 3.0] - Help w/ TransactionAttributeType.REQUIRES_NEW
I have some test code that exercises REQUIRES_NEW, but looking at the TransactionManager logs, I don't see a new tx being created when that method executes. I'm using JBoss 4.0.4 GA and the EJB3 RC7 FD download. The players are two SLSBs TxTestBean. I'm calling the toplevel() method from a simple jsp that just looks up the bean and makes the call. Here's the code for TxTestBean: | @Stateless | public class TxTestBean implements TxTestLocal { | | public static Logger log = Logger.getLogger( TxTest ); | | /* (non-Javadoc) | * @see com.sonus.test.TxTestLocal#toplevel() | */ | public void toplevel() { | log.info (beginning toplevel test w/ ejb3); | part1(); | part3(); | log.info (leaving toplevel test w/ ejb3); | } | | /* (non-Javadoc) | * @see com.sonus.test.TxTestLocal#part1() | */ | public void part1() { | try { | log.info( part 1: about to call list nodes); | | Context context = ContextFactory.getLocalInitialContext(); | NodeAccess nodeAccess = (NodeAccess) context.lookup( NodeAccessBean/local ); | List nodes = nodeAccess.listNodes(); | log.info( part 1: list nodes done ); | part2(); | } catch( Exception e ) { | log.error ( exception in part1: + e); | } | } | | | /* (non-Javadoc) | * @see com.sonus.test.TxTestLocal#part2() | */ | public void part2() { | try { | log.info( part 2: about to call list nodes); | Context context = ContextFactory.getLocalInitialContext(); | NodeAccess nodeAccess = (NodeAccess) context.lookup( NodeAccessBean/local ); | List nodes = nodeAccess.listNodes(); | log.info( part 2: list nodes done ); | } catch( Exception e ) { | log.error ( exception in part2: + e); | } | } | | /* (non-Javadoc) | * @see com.sonus.test.TxTestLocal#part3() | */ | @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) | public void part3() { | try { | log.info( part 3: about to call list nodes); | Context context = ContextFactory.getLocalInitialContext(); | NodeAccess nodeAccess = (NodeAccess) context.lookup( NodeAccessBean/local ); | List nodes = nodeAccess.listNodes(); | log.info( part 3: list nodes done ); | } catch( Exception e ) { | log.error ( exception in part3 : + e); | } | } | | } So I'd expect to see a log message indicating a new tx starting right before my log message part 3: about to call list nodes (which happens at time 2006-06-05 14:34:08,522). Here's the log - I see only a single tx started and committed. I'm not sure how to proceed. 2006-06-05 14:34:08,459 TRACE [org.jboss.tm.TransactionImpl] Created new instance for tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=, localId=20] | 2006-06-05 14:34:08,459 TRACE [org.jboss.tm.TxManager] began tx: TransactionImpl:XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=, localId=20] | 2006-06-05 14:34:08,459 INFO [TxTest] beginning toplevel test w/ ejb3 | 2006-06-05 14:34:08,459 INFO [TxTest] part 1: about to call list nodes | 2006-06-05 14:34:08,459 DEBUG [com.sonus.common.dao.node.NodeAccessBean] NodeDAO: listNodes(true) | 2006-06-05 14:34:08,459 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=, localId=20] status=STATUS_ACTIVE | 2006-06-05 14:34:08,459 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=, localId=20] status=STATUS_ACTIVE | 2006-06-05 14:34:08,475 TRACE [org.jboss.tm.TransactionImpl] registerSynchronization(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=, localId=20] status=STATUS_ACTIVE | 2006-06-05 14:34:08,475 TRACE [org.jboss.tm.TransactionImpl] enlistResource(): Entered, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=, localId=20] status=STATUS_ACTIVE [EMAIL PROTECTED] | 2006-06-05 14:34:08,475 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=1, localId=20]) entered: [EMAIL PROTECTED] flags=0 | 2006-06-05 14:34:08,475 TRACE [org.jboss.tm.TransactionImpl] startResource(XidImpl[FormatId=257, GlobalId=dabramovich/20, BranchQual=1, localId=20]) leaving: [EMAIL PROTECTED] flags=0 | 2006-06-05 14:34:08,490 TRACE [org.jboss.tm.TxManager] tx timeout is now: 300s | 2006-06-05 14:34:08,490 INFO [TxTest] part 1: list nodes done |
[JBoss-user] [EJB 3.0] - Re: Help w/ TransactionAttributeType.REQUIRES_NEW
I ran my test in the debugger. When the TxTestBean is deployed I see the TxInterceptorFactory create a new instance of a TxInterceptor.RequiresNew for the part3() method. However when the test is executed, a breakpoint set on TxInterceptor.RequiresNew.invoke() never gets hit. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3949230#3949230 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3949230 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Sending to both UIL2 and JVM IL
JBoss 4.0.3SP1, Java 1.5 We're using JMS for notifications to various local subsystems. However, we also have slave servers that need to receive the same notifications. Anyone know of a simple way to send a single notification that remote subscribers can receive on UIL2, and local subscribers can receive using JVM IL? I'm concerned that it's not intuitive (and duplicate code) for publishers to know to have to send over both ILs. Thanks, -Dan View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3943064#3943064 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3943064 --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Messaging, JMS JBossMQ] - Re: Tracking down MQ Threads
Finally got around to doing some tracing - I turned on the TRACE logging for the TraceInterceptor. I can see subscriptions and unsubsciptions being logged. The problem is that the ID identifing any particular subscription are bogus - always -2147483648 which is min int. Based on this information, it's not possible to correlate subscribes with the unsubscribes, so I can't see what's not being closed. Ideas? 2005-09-13 15:24:19,727 Thread-27528 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : subscribe 2005-09-13 15:24:19,727 Thread-27528 TRACE [org.jboss.mq.server.TracingInterceptor] ARG: Subscription[subId=-2147483 648 destination=TOPIC.FMLiveEventChangeTopic messageSelector=(JMSType = 'Updated' OR JMSType = 'Deleted' OR JMSType = 'N ew') AND (DeviceType='SOLARIS' ) Local Create] 2005-09-13 15:26:19,304 Thread-27555 TRACE [org.jboss.mq.server.TracingInterceptor] CALLED : unsubscribe 2005-09-13 15:26:19,304 Thread-27555 TRACE [org.jboss.mq.server.TracingInterceptor] ARG: -2147483648 2005-09-13 15:26:19,305 Thread-27555 TRACE [org.jboss.mq.server.TracingInterceptor] RETURN : unsubscribe View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3894528#3894528 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3894528 --- 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] - Tracking down MQ Threads
This is JBoss 3.2.6, Java 1.4.2 While debugging an issue, we did a thread dump on our application and noticed approximately 240 UIL2 ReadTask/WriteTask thread pairs. 116 pairs are associated w/ port 8093, which I would assume would represent our JMS queues and topics. 118 pairs are associated w/ some higher user port, which look like they would represent client subscriptions. Since those numbers seems very high for our application I looked at the jmx-console for more detail. We have a total (including the DLQ) of 12 topics/queues. Across all of the topics/queues, we have a total of 12 subscriptions/receivers. However, the DestinationManager MBean reports a ClientCount of 126. Can anyone help me interpret this? What is the difference (and perhaps why the discrepancy) between the # of clients and subscriptions/receivers? How can we track down where all these threads are coming from? Thanks, -Dan View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3891728#3891728 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3891728 --- 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] [JCA/JBoss] - Re: problem w/ OracleValidConnectionChecker
A bit more info - I added some debug to the OracleValidConnectionChecker. It appears that the Connection that is getting passed to the isValidConnection(Connection c) method is not, in fact, an oracle.jdbc.driver.OracleConnection but rather a JBoss proxy of some kind. The top of the isValidConnection method does: log.info( checking valid connection: + c ); |log.info( connection is: + c.getClass().getName() ); |log.info( ping method: + ping ); |log.info( ping method declaring class: + ping.getDeclaringClass().getName() ); 2005-07-06 14:55:00,444 INFO [MyOracleValidConnectionChecker] checking valid connection: [EMAIL PROTECTED] 2005-07-06 14:55:00,444 INFO [MyOracleValidConnectionChecker] connection is: $Proxy47 2005-07-06 14:55:00,445 INFO [MyOracleValidConnectionChecker] ping method: public int oracle.jdbc.driver.OracleConnection.pingDatabase(int) throws java.sql.SQLException 2005-07-06 14:55:00,446 INFO [MyOracleValidConnectionChecker] ping method declaring class: oracle.jdbc.driver.OracleConnection View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3883910#3883910 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3883910 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [JCA/JBoss] - problem w/ OracleValidConnectionChecker
Using: JBoss 3.2.6 Java 1.4.2_05-b04 Oracle: 9.2.0.1.0 Oracle driver: 9.0.2.0.0 I'm trying to use the OracleValidConnectionChecker, but get the exception below when a connection is requested. From the error and taking a look a the OracleValidConnectionChecker, it looks like Connection being passed in, isnt' really an Oracle connection. Ideas? My datasource config looks like: ?xml version=1.0 encoding=UTF-8? | !-- Data Source for the Insight DB -- | datasources | no-tx-datasource | jndi-nameSonusInsightDS/jndi-name | connection-urljdbc:oracle:thin:@10.6.20.110:1521:DADB/connection-url | driver-classoracle.jdbc.driver.OracleDriver/driver-class | user-namedbimpl/user-name | passworddbimpl/password | min-pool-size1/min-pool-size | max-pool-size2/max-pool-size | idle-timeout-minutes240/idle-timeout-minutes | !-- Warn when statements and result sets are returned to the connection pool and are not closed -- | !-- track-statementstrue/track-statements -- | valid-connection-checker-class-nameorg.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker/valid-connection-checker-class-name | /no-tx-datasource | /datasources 2005-07-05 16:14:55,185 WARN [org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker] Unexpected error in pingDatabase java.lang.IllegalArgumentException: object is not an instance of declaring class at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker.isValidConnection(OracleValidConnectionChecker.java:51) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnectionFactory.isValidConnection(BaseWrapperManagedConnectionFactory.java:458) at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.checkValid(BaseWrapperManagedConnection.java:284) at org.jboss.resource.adapter.jdbc.local.LocalManagedConnectionFactory.matchManagedConnections(LocalManagedConnectionFactory.java:190) at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:166) at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:534) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:444) at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:429) at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496) at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:887) at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:102) ... View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3883751#3883751 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3883751 --- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - mbean lifecycle
Can someone confirm (or deny - though I prefer confirm) that if I lookup an MBean through the MBeanServer it will only be available after the MBean has completed its start() method? Thanks. -Dan View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3874863#3874863 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3874863 --- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: mbean lifecycle
Thanks for the quick replies. In this case, the MBean that I'm looking up is not extending ServiceMBeanSupport. Can I get at the state information via another mehtod (MBeanServer.getAttribute()) ? View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3874888#3874888 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3874888 --- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] [Management, JMX/JBoss] - Re: mbean lifecycle
Fair enough. Thanks. View the original post : http://www.jboss.org/index.html?module=bbop=viewtopicp=3874891#3874891 Reply to the post : http://www.jboss.org/index.html?module=bbop=postingmode=replyp=3874891 --- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 ___ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user