[jboss-user] [JCA/JBoss] - Re: RAR configuration best practice
Thank you for the pointer. I had looked at that example, and while it is very useful in showing how all the pieces fit together, there isn't much in the way of connection properties. It really only has the target directory. I still have that information in my ra.xml file, and logically I'm starting to think that it makes the most sense there. I would just like it if there were an easier way for an administrator to change that information than to crack open a .rar file, make the changes and repackage it. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237717#4237717 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237717 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - RAR configuration best practice
I'm writing a inbound connector for a legacy system using JCA 1.5. There are several configuration parameters which I've exposed through the ResourceAdapter bean mechanism and set in the ra.xml file (not because this is the best way necessarily, but because I was trying to get the whole thing working). These include the connection URL, proxy information, and log in credentials. Where is the best place (or best practice) for this type of configuration information? Thanks, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237280#4237280 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237280 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: JCA build error
Check your JAVA_HOME variable. Ant relies on this to find the compiler. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4237028#4237028 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4237028 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: Configuring Local and Remote JMS
I posted in both places since I had read a message on that board that said a different poster's question belonged on this board since it was dealing with the connection-factories. For the archives: I was able to get it to work once I moved the mbean description into its own file and out of the jms-ds.xml file. I was told it should work in either place, but I ran out of time trying to figure out why it wasn't working for me to combine them. Besides, having a separate file makes it easier to deploy and manage, so it is a better solution anyway. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236083#4236083 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236083 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB/JBoss] - Re: Too many open files exception JBOSS 4.2
What was the solution to this? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233905#4233905 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233905 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Configuring the JMS Bridge
This is either a bug or else the documentation is misleading... I moved the remote JMS provider MBean into its own file (instead of adding it to jms-ds.xml) and now my messages are flowing. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233646#4233646 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233646 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Configuring the JMS Bridge
Verified: No errors or warnings for either the Bridge or PostOffice. I also set different -Djboss.messaging.ServerPeerID for each of my server instances. Does the bridge REQUIRE a selector? I don't have one set. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233623#4233623 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233623 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Configuring the JMS Bridge
I didn't see any error information in either server's log. I'm running this again to verify that I didn't just over look something. As for the ServerPeerID's, I did not explicitly set it on either server. However I've been using different jboss.service.binding.set values for the two. Does that change the ServerPeerID? I haven't seen any warnings or errors related to the PostOffice during startup of either server. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233607#4233607 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233607 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Configuring the JMS Bridge
I've got two JBoss 5.0.1.GA instances. Server A has a topic and I would like to have bridged to a Queue on Server B. I've added the following to Server B's deploy/messaging/jms-ds.xml | | | RemoteXAConnectionFactory | org.jboss.jms.jndi.JNDIProviderAdapter | | | XAConnectionFactory | | XAConnectionFactory | | XAConnectionFactory | | java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces | java.naming.provider.url=localhost:1199 | | | I then created a file {Server B}/deploy/messaging/dfm-bridge-service.xml | | | | | | jboss.messaging:service=JMSProviderLoader,name=MyRemoteJMSProvider,server=remotehost | | | jboss.messaging:service=JMSProviderLoader,name=JMSProvider | | | /topic/noticeTopic | /queue/ingestRemote | 2 | 5 | -1 | 5000 | -1 | false | | | I start up both servers and everything seems happy, including a message on I've connected a very simple MDB to the queue on Server B | @MessageDriven(activationConfig = { | @ActivationConfigProperty( | propertyName = "destinationType", | propertyValue = "javax.jms.Queue"), | @ActivationConfigProperty( | propertyName = "destination", | propertyValue = "queue/ingestRemote"), | @ActivationConfigProperty( | propertyName = "maxSession", | propertyValue = "1") | }) | public class IngestDFMMDB implements MessageListener { | private final Log log = LogFactory.getLog(getClass()); | | public void onMessage(Message msg) { | log.fatal("DFM message received: " + msg); | } | } | I send messages to Server A's topic and detect that they have been sent via a JUnit test, but no message ever makes it to Server B's queue. I've been following the instructions from here: http://www.jboss.org/community/wiki/JBMBridgeConfiguration Any ideas why my MDB never gets called? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233439#4233439 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233439 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: Configuring Local and Remote JMS
You're right. That got rid of my error. Now my jms-ds.xml looks like this: | | | | ...as provided in JBoss distro... | | | | DFMJMSProvider | | | org.jboss.jms.jndi.JNDIProviderAdapter | | | | XAConnectionFactory | | XAConnectionFactory | | XAConnectionFactory | | | | java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces | java.naming.provider.url=localhost:1199 | | | | Note: I've removed the tx-connection-factory that I had previously added to jms-ds.xml, but the original tx-connection-factory XML is still there. The descriptor and my application both deploy now without error. However, I'm still not getting any messages delivered to my MDB. It seems, however, that the two instances of JBoss are talking at some level as bringing down my client instance causes this stacktrace in the remote JMS server. | 14:33:54,649 WARN [Dispatcher] Cannot find object with id pk-xdxg47vf-1-apahx6vf-hj5iam-n6dm1r3 to register | 14:33:54,649 ERROR [ExceptionUtil] ConnectionEndpoint[8k-9vwg47vf-1-apahx6vf-hj5iam-n6dm1r3] close [kl-1m4k47vf-1-apahx6vf-hj5iam-n6dm1r3] | java.lang.NullPointerException | at org.jboss.jms.server.endpoint.ServerConsumerEndpoint.localClose(ServerConsumerEndpoint.java:542) | at org.jboss.jms.server.endpoint.ServerSessionEndpoint.localClose(ServerSessionEndpoint.java:1151) Any ideas on getting topic messages delivered? I can verify that they are being posted to the remote server's topic as an MDB local to it receives and logs the messages. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233429#4233429 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233429 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Re: Configuring Local and Remote JMS
Correction on the previous post: The Exception occurs whether my app has been deployed or not. My MDB's annotations look like this: | @MessageDriven(activationConfig = { | @ActivationConfigProperty( | propertyName = "destinationType", | propertyValue = "javax.jms.Topic"), | @ActivationConfigProperty( | propertyName = "destination", | propertyValue = "topic/noticeTopic"), | @ActivationConfigProperty( | propertyName = "providerAdapterJNDI", | propertyValue = "DFMJMSProvider") | }) | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233414#4233414 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233414 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JCA/JBoss] - Configuring Local and Remote JMS
It seems like this should be pretty easy, and it probably is, but... I'm trying to configure a JBoss 5.0.1.GA instance to use both it own local JBM instance as well as connect to a remote JBoss 5.0.1.GA instance (also using JBM). Ultimately I want to be able to use EJB3 MDBs on local and remote queues and topics I've tried using the configurations I've found on the Wiki, and net which all basically look like this: | | DFMJMSProvider | org.jboss.jms.jndi.JNDIProviderAdapter | | | java:/XAConnectionFactory | | java:/XAConnectionFactory | | java:/XAConnectionFactory | | | | java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory | java.naming.factory.url.pkgs=org.jnp.interfaces | java.naming.provider.url=localhost:1199 | | by appending the above to my otherwise unchanged deploy\messaging\jms-ds.xml file. When just starting JBoss, with no application deployed, everything seems happy. At least there are no warning or error messages logged. However, when I deploy a simple MDB that tries to connect to the remote topic, I get a Exceptions culminating in this one: | DEPLOYMENTS IN ERROR: | Deployment "vfsfile:/C:/tools/jboss/jboss-5.0.1.GA/server/standard/deploy/messaging/jms-ds.xml" | is in error due to the following reason(s): java.lang.IllegalStateException: | jboss.messaging:name=JMSProvider,service=JMSProviderLoader is already installed. | I also saw one suggestion to add a tx-connection-factory and so I have also appended this to the same jms-ds.xml file: | | DFMConnectionFactory | | jms-ra.rar | org.jboss.resource.adapter.jms.JmsConnectionFactory | DFM JMS Adapter | javax.jms.Topic | java:/DFMProvider | JmsXARealm | | I am shooting in the dark at this point as I cannot find any examples or documentation that describes how to have both a local and remote provider. Thanks for your help, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4233408#4233408 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4233408 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - @Resource(name =
I've been searching the 'net trying to find out how to use in JBoss 5.0.1.GA. @Resource(name = "some/name") However, all of the examples show the annotation used this way: @Resource(mappedName = "some/jndi/name") Also, the specification says that mappedName is a provider specific attribute, app servers aren't required to even implement it, and that it is absolutely not portable. All sound like good reasons to avoid using mappedName. Since I can't seem to find any instructions (and guessing hasn't given me any results either), I'll ask. Is there a way to use the name form of the @Resource annotation in JBoss? If so, where can I discover (or configure) the name of the JMS topic I'm trying to inject? Thanks, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232598#4232598 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232598 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Timer cancled during timeout execution
I'm using an EJB3 style Stateless Session Bean as a target for a timer. During my integration testing I have the timer turned up to repeat very quickly (100ms interval) so that I don't have to wait for too long while the tests are executing. However, it has illustrated a problem that may have taken a really long time to witness (in fact I may never have witnessed it). My test configures the timer to run on a tight interval, calls a method that starts the timer, does some checking to make sure the timer has done its job, and then cancels the timer. However, the test frequently cancels the timer while the handleTimeout method is executing. I know this, because I check to see if the Timer is valid at the beginning of the method, but toward the end of the method I get an exception when I call Timer.getInfo 10:56:12,890 ERROR [TimerImpl] Error invoking ejbTimeout ejb.NoSuchObjectLocalException: Timer was canceled Being in a session bean, I had assumed that the public methods, including the @Timeout public void handleTimeout(Timer tmr) method would be transactional and therefore wouldn't interfere with each other like this. Am I doing something wrong or is there a bug here? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232558#4232558 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232558 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: MDB external configuration
Alright. I'll give it a go. Thanks guys for the tip! View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232546#4232546 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232546 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - Re: MDB external configuration
"jaikiran" wrote : In either case i guess you could specify some system property that gets substituted per system, dynamically... | | Then, you can pass this property value as a JVM parameter through the server startup scripts... | | You can edit the run.bat or run.conf to pass this property too. That's a slick trick. Is property substitution on deployment descriptors a standard JavaEE thing, or is that specific to JBoss? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232526#4232526 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232526 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
Posted: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=155809 View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232488#4232488 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232488 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [EJB 3.0] - MDB external configuration
I have a JavaEE system that has one feeder application and several consumer applications. The producer is transmitting messages over a JMS topic. The consumer applications are all EJB3 apps, and I had planned to use MDBs on the consumer systems to process the incoming messages. However, while most of the messages are legitimately broadcast messages, on occasion the producer system needs to target a specific consumer system. I had thought to do this via the selector mechanism. Something like this: clientID is NULL AND feed in ('feed1', 'feed2') | OR | clientID = 'myClientID' AND feed in ('feed1', 'feed2') I deploy my apps in ear files. Is there a way to specify a selector outside of the .ear file so the person installing the application can adjust the client ID? I'm hesitant to require that the person installing my consumer application(s) unzip the ear, change the selector's "myClientID" value, and rezip it. I would rather use a identical application package on our multiple production servers (and the test servers for that matter) and have other files, descriptors, or database settings outside of the ear tweaked to account for the environment. Ultimately, it would be great to be able to modify the selector at runtime so I can use my application's existing configuration mechanisms to locate and set the clientID. Is that possible? (FYI: I posted this scenario on the JB Messaging forum already to discuss the JMS aspects of this scenario http://www.jboss.org/index.html?module=bb&op=viewtopic&t=155644) Any other ideas are appreciated as well, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232487#4232487 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232487 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
OK, thanks again for all your help. I'll post over there and see what I can dig up. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232480#4232480 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232480 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
I think I can use Tim's suggestion (if I can find a way to assign the selector outside the ear). Something like: clientID is NULL AND feed in ('feed1', 'feed2') | OR | clientID = 'myClientID' AND feed in ('feed1', 'feed2') So is there a way for me to assign the clientID other than in the annotations of the MDB or in the embedded deployment descriptor? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232362#4232362 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232362 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
Thank you guys for your help here! timfox: Is there a way to specify the selector outside of the .ear file? I'm hesitant to require that the deployer of my application unzip the ear, change an ID, and rezip it. I would rather use a identical application package on our production and test servers and have other files, descriptors, or database settings tweaked to account for the environment. If that is possible with selectors, then that sounds like the least complicated solution. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232023#4232023 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232023 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
clebert: Thanks for the pointer, I've checked out the sample and started to look it over. timfox: If I deploy my app in an .ear file, wouldn't I have to muck around with the embedded deployment descriptors in each client in order to assign the unique IDs? I would love to be able to modify the selector at runtime so I can my application's existing configuration mechanisms, is that possible? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4232005#4232005 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4232005 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
Sure (and thanks so much for your help!). I have what amounts to a store-and-forward system (let's call it the SAF for this discussion). It feeds multiple client systems. The SAF receives a number of files from different, external systems, which it stores and makes available via HTTP. The clients are each interested in some subset of these files (the subsets can and will overlap). I am trying to design a communications mechanism that will allow the SAF to send asynchronous notifications to the clients when interesting files arrive. In most cases this will be done as the files arrive (perfect for a topic with client-side selectors), however, I also need to build in the ability to target one particular client from the SAF and re-play the notifications. Say I add a new client system, I need to be able to tell the SAF to send notifications to that new client for files that were received before the client was added (back-filling). Also, if a processing algorithm changes on one of the clients, I may need to send notifications for files that the client had processed once before (re-sending). It is really this notion of targeting a single client that has me befuddled. Adding a new queue for each client administratively seems like a tight coupling and a fair amount of manual configuration overhead. Using a pure topic, I can't figure out how to provide this secondary feature of targeted playback. Did that clarify the situation enough? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231961#4231961 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231961 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Re: Multiple clients and message types - selectors?
That's where I was headed... I need to be able to also (re)send a notification to only one client (preferably using the same mechanism). I had thought I could have a selector that looks for my notifications of interest and/or notifications with a property set to the client's ID, but I don't know if it is possible to configure selectors that way (or better if there is another way to identify specific clients when I send messages). Can I do this with topics? View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231763#4231763 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231763 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Messaging] - Multiple clients and message types - selectors?
I am designing a system that will generate notifications of different types of events and will have different systems subscribed to it. All clients will only be interested in a subset of these events, although overlapping interest between clients is fully expected. Also, I need to add the ability to publish (or re-publish) certain events to individual clients to the exclusion of others that are generally interested the same published events. I basically control both the notifying system as well as the client systems so most options are available to me. All of them are currently using EJB3 annotations. I had originally thought that I could use a single topic to publish all notifications and have the clients use selectors to select only the event types interesting to each. In order to provide the ability to publish to specific clients, I thought I could use selectors there as well. Unfortunately, it appears that having dynamic or at least a programmatic selector is not possible (at least I haven't found a way to do this yet). So the question is two-fold. 1) Is there a way to set/change a MDB selector programmatically? 2) Is there a better approach to creating this communication scheme? Thanks, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231749#4231749 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231749 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
I haven't noticed any adverse effects yet. You do get a warning in the log, however. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4231748#4231748 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4231748 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Tools (users)] - Re: annoying error : incomplete deployment exception
I'm seeing the same error (also using 5.0.1.GA), but instead of using tools, I'm just copying the ear file into the deploy directory with Ant. A restart of JBoss (without the undeploy, clean, redeploy) seems to take care of the problem for me. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227513#4227513 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227513 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
I eliminated this last error by shutting down JBoss, truncating the timers table, and then restarting JBoss. Another issue has come up with this configuration. I tried to install a second box (one of our testing serviers) using the final configuration from the above experiments and ran into problems. Apparently, if I use the XA data source specification that I show above (without first using the non-XA source), then the JMS tables will not get created in the database and the Messaging service fails to start. Here are some stacktrace snips: | 2009-04-16 10:17:34,446 DEBUG [org.jboss.messaging.core.jmx.JDBCPersistenceManagerService] (main) Starting jboss.messaging:service=PersistenceManager | | 2009-04-16 10:17:34,493 DEBUG [org.jboss.messaging.core.impl.JDBCSupport] (main) Failed to execute: CREATE TABLE JBM_DUAL (DUMMY INTEGER, PRIMARY KEY (DUMMY)) ENGINE = INNODB | | java.sql.SQLException: XAER_RMFAIL: The command cannot be executed when global transaction is in the ACTIVE state | | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055) | | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956) | | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515) | | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447) | | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951) | | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101) | | at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548) | | at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1605) | | at com.mysql.jdbc.StatementImpl.executeUpdate(StatementImpl.java:1524) | | at com.mysql.jdbc.jdbc2.optional.StatementWrapper.executeUpdate(StatementWrapper.java:839) | | at org.jboss.resource.adapter.jdbc.WrappedStatement.executeUpdate(WrappedStatement.java:249) | | at org.jboss.messaging.core.impl.JDBCSupport.createSchema(JDBCSupport.java:301) | | at org.jboss.messaging.core.impl.JDBCSupport.start(JDBCSupport.java:167) | | at org.jboss.messaging.core.impl.JDBCPersistenceManager.start(JDBCPersistenceManager.java:148) | | at org.jboss.messaging.core.jmx.JDBCPersistenceManagerService.startService(JDBCPersistenceManagerService.java:100) | | at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:376) | | at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:269) | | 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:597) | | at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) | | at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) | | at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138) | | at org.jboss.mx.server.Invocation.invoke(Invocation.java:90) | | at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140) | | at org.jboss.mx.server.Invocation.invoke(Invocation.java:90) | | at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264) | | at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668) | | at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) | | at $Proxy36.start(Unknown Source) | | at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42) | | at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37) | | at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) | | at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) | | at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) | | at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348) | | at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286) | | at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598) | | at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934) | | at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062) | | at org.jboss.dependency.plugins.Abstrac
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
I tried setting the DefaultDS as a XA Data Source using a datasource descriptor I found on the net (I can't vouch for it's correctness) and leaving my application's data source as a local-tx (like what is found in docs/examples/jca). | | | DefaultDS | com.mysql.jdbc.jdbc2.optional.MysqlXADataSource | jdbc:mysql://localhost:3306/jbossdb | user | pass | TRANSACTION_READ_COMMITTED | | true | false | | | org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter | | mySQL | | | | My application deploys with this configuration, and my regression tests all run and pass. I do get an error on start up, however. | 11:14:51,021 INFO [SessionSpecContainer] Starting jboss.j2ee:ear=myapp.ear,jar=myapp-beans.jar,name=AgingImpl,service=EJB3 | 11:14:51,021 INFO [EJBContainer] STARTED EJB: myapp.control.aging.AgingImpl ejbName: AgingImpl | 11:14:51,036 INFO [JndiSessionRegistrarBase] Binding the following Entries in Global JNDI: | | myapp/AgingImpl/remote - EJB3.x Default Remote Business Interface | myapp/AgingImpl/remote-myapp.client.control.aging.Aging - EJB3.x Remote Business Interface | | 11:14:51,239 ERROR [TimerImpl] Error invoking ejbTimeout | org.jboss.aop.DispatcherConnectException: EJB container is not completely started, or is stopped. | at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:62) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67) | at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102) | at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:304) | at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561) | at java.util.TimerThread.mainLoop(Timer.java:512) | at java.util.TimerThread.run(Timer.java:462) | | ...(following INFO [JndiSessionRegistrarBase] Binding messages omitted)... | I haven't been able to find any information on this one yet, but I'm guessing that a persisted timer is firing before the container is ready for it. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225717#4225717 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225717 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
Progress update: 1) Copied the deploy/mysql-ds.xml file to deploy/app-mysql-ds.xml 2) Changed the JNDI name, changed the URL, changed the credentials in app-mysql-ds.xml 3) Restarted JBoss -- No errors and no new warnings -- 4) Deployed my JMS queues -- No errors -- 5) Deployed my app and I get a slew of warnings | 09:50:27,318 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container | 09:50:27,318 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container | 09:50:27,318 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.cancelTimer() | 09:50:27,334 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer(java.util.Date,long) | 09:50:27,349 WARN [InterceptorRegistry] applicable interceptors is non-existent for public long myapp.control.aging.AgingImpl.getTimeRemaining() | 09:50:27,365 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer() | 09:50:27,381 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.ejbTimeout(javax.ejb.Timer) | 09:50:27,381 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.cancelTimer() | 09:50:27,396 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer(java.util. | Date,long) | 09:50:27,412 WARN [InterceptorRegistry] applicable interceptors is non-existent for public long myapp.control.aging.AgingImpl.getTimeRemaining() | 09:50:27,427 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.initializeTimer() | 09:50:27,443 WARN [InterceptorRegistry] applicable interceptors is non-existent for public void myapp.control.aging.AgingImpl.ejbTimeout(javax.ejb.Timer) | 09:50:27,459 INFO [AgingImpl] Initializing aging timer. | 09:50:27,459 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container | 09:50:27,459 WARN [InterceptorsFactory] EJBTHREE-1246: Do not use InterceptorsFactory with a ManagedObjectAdvisor, InterceptorRegistry should be used via the bean container | 09:50:27,459 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.Object myapp.control.setting.SettingsImpl.get(myapp.client.control.setting.Key) | 09:50:27,474 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.String myapp.control.setting.SettingsImpl.getRaw(myapp.client.control.setting.Key) | 09:50:27,474 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.util.EnumMap myapp.control.setting.SettingsImpl.getAll() | 09:50:27,490 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.Object myapp.control.setting.SettingsImpl.get(myapp.client.control.setting.Key) | 09:50:27,506 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.lang.String myapp.control.setting.SettingsImpl.getRaw(myapp.client.control.setting.Key) | 09:50:27,506 WARN [InterceptorRegistry] applicable interceptors is non-existent for public java.util.EnumMap myapp.control.setting.SettingsImpl.getAll() | If my internet searching is correct, these can be safely ignored (http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.0/html/EJB3_Interceptors.html the very bottom of the page). The one that concerns me however is this one. | 09:50:27,631 WARN [loggerI18N] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] [com.arjuna.ats.internal.jta.transaction.arjunacore.lastResource.disallow] Adding multiple last resources is disallowed. Current resource is org.jboss.resource.connectionmanager.TxConnectionManager$LocalXAResource | @26eac5 | 09:50:27,631 ERROR [AgingImpl] EJB Exception during create timer : javax.ejb.EJBException: Failed to create timer | View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225707#4225707 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225707 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Multiple data sources when using MySQL
I started with a clean copy of the "standard" server and applied the instructions from http://www.jboss.org/community/docs/DOC-12255 This is JBoss 5.0.1.GA and MySQL 5.1.33 Here are my notes corresponding to the step in the instructions: 1) Done 2) Done 3) Done 4) Referenced file (standardjaws.xml) not found, step skipped 5) datasource - No change needed; datasource-mapping - It was commented out with "optional since 4.0", I uncommented it and put in the suggested value of mySQL; fk-constraint - changed as instructed 6) Added the specified security realm inserting my databases credentials (leaving the already present HsqlDbRealm) 7) Referenced file (hsql-jdbc2-service.xml) was not found, substituted hsqldb-persistence-service.xml and mysql-persistence-service.xml in this step instead. 8) As in (7) the file was not found, using mysql-persistence-service.xml instead, the referenced elements were not present, and the data source seemed to be set to DefaultDS already. 9) Referenced file (hsqldb-jdbc-state-service.xml) was not found I started JBoss without my application deployed and got the following message: | 08:57:58,476 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS' | 08:57:58,820 WARN [JDBCPersistenceManager] JBoss Messaging Warning: DataSource connection transaction isolation should be READ_COMMITTED, but it is currently REPEATABLE_READ. Using an isolation level less strict than READ_COMMITTED may lead to data consistency problems. Using an isolation level more strict than READ_COMMITTE may lead to deadlock. | 08:57:59,007 INFO [ServerPeer] JBoss Messaging 1.4.1.GA server [0] started | 08:57:59,038 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA' | 08:57:59,070 INFO [TomcatDeployment] deploy, ctxPath=/ | 08:57:59,117 INFO [TomcatDeployment] deploy, ctxPath=/jmx-console | 08:57:59,163 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of | incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): | | DEPLOYMENTS MISSING DEPENDENCIES: | Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFac | tory" is missing the following dependencies: | Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured") | ... | I added the element to deploy/mysql-ds.xml | TRANSACTION_READ_COMMITED | I restarted JBoss and got the following message: | 09:13:23,431 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): | | DEPLOYMENTS MISSING DEPENDENCIES: | Deployment "jboss.messaging.connectionfactory:service=ClusterPullConnectionFac | tory" is missing the following dependencies: | Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured") | Deployment "jboss.messaging.connectionfactory:service=ClusteredConnectionFactory" is missing the following dependencies: | Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured") | Deployment "jboss.messaging.connectionfactory:service=ConnectionFactory" is mi | ssing the following dependencies: | Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured") | Deployment "jboss.messaging.destination:name=DLQ,service=Queue" is missing the following dependencies: | Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured") | Deployment "jboss.messaging.destination:name=ExpiryQueue,service=Queue" is mis | sing the following dependencies: | Dependency "jboss.messaging:service=PostOffice" (should be in state "Create", but is actually in state "Configured") | Deployment "jboss.messaging:service=PostOffice" is missing the following dependencies: | Dependency "jboss.jgroups:service=ChannelFactory" (should be in state "Create", but is actually in state "** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' **") | | DEPLOYMENTS IN ERROR: | Deployment "jboss.jgroups:service=ChannelFactory" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jgroups:service=ChannelFactory' ** | I commented out the element jboss.jgroups:service=ChannelFactory in the file deploy/messaging/mysql-persistence-service.xml | JBoss now starts with this warning: | 09:18:12,162 WARN [ConnectionFactoryJNDIMapper] supportsFailover attribute is true on connection factory: jboss.messaging.connectionfactory:service=ClusteredConnectionFactory but post office is non clustered. So connection factory will *not* support failover | 09:18:12,16
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Multiple data sources when using MySQL
I got this piece of advice in response to a question I asked in another thread: http://www.jboss.org/index.html?module=bb&op=viewtopic&t=154018 It seemed to warrant its own discussion... "PeterJ" wrote : Well, one best practice is to definitely not use DefaultDS for your apps. Leave the JBoss AS services with DefaultDS (though you should use a database other than Hypersonic for it), and each of your apps should use their own data sources, unless the apps are accessing the same data in which case they would want to use the same datasource. Actually, if the two apps are accessing the same data you probably really want one set of EJBs accessing the database with two web apps using that one set of EJBs. I spent the afternoon working on this, and apparently it is not common with MySQL as the database as there is very little information to be found on how to configure JBoss. I started by creating a second schema (database) in MySQL to house the JBoss infrastructure tables (both are in the same server instance localhost:3306). The newbie approach (which is where I started) was to use the mysql-ds.xml file found in the documents/examples/jca directory and replicate the datasource XML, rename the copy, update the URL, etc. to get my second data source. This approach appeared to work until I loaded my app and tried to register a timer which failed with a very nice stack trace. After some searching, I found out that it failed because there are two local-tx data sources, which doesn't work since JBoss is attempting to use a 2PC. The timer was using one 1PC source, while my beans were using a different 1PC source. The next approach was to try to configure both as XA data sources. I couldn't find any examples in the JBoss 5.0.1.GA installation for MySQL, but after some searching on the net I found some XML that seemed passable. I configured both to be XA data sources and deployed my app. When I ran my regression tests, I found that my application was failing because I had a DROP TABLE statement as part of a SQL batch. Apparently DROP (as well as a hand full of other SQL commands) don't play well in MySQL using XA data sources, since they create implied transaction boundaries and that is bad when you are within a XA transaction. So, I end the day with a few big questions: 1) How important is it to have JBoss infrastructure use the DefaultDS while applications use something else? (Stated in another way, what advantage does this configuration provide?) 2) Is this a supported (as in tried and tested, not as in paid support) configuration using MySQL and JBoss 5.0? 3) Is there really a need to use XA data sources when one source is for JBoss infrastructure and the other is for my application? 4) Is there another solution that I have overlooked or may be otherwise unaware of? Thanks, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225518#4225518 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225518 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: How to configure MySQL datasource for JBOSS 5.0.1
Is there some help in configuring an XADataSource for JBoss 5.0.1.GA and MySQL 5.x? I haven't been able to find much of anything. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225496#4225496 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225496 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Best Practice for multiple applications
Thanks for the quick reply! So if I may boil down your reply, it sounds like if I have the hardware resources available to run them in different instances of JBoss, then I should do so. It sounds like the administration in the long run will be easier if I run them separately. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225478#4225478 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225478 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [Installation, Configuration & DEPLOYMENT] - Best Practice for multiple applications
This is hopefully an easy enough question to answer... I am trying to determine what is considered the best practice for deploying two (basically unrelated and) different J2EE applications to the same hardware server. 1) Deploy both applications to the same instance of JBoss 2) Deploy each to its own instance of JBoss 3) Something else? It seems that (1) would require each application to "know" about its specific data source (as opposed to using DefaultDS), and that (2) could potentially involve much more overhead and duplication. Thanks, Josh View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225459#4225459 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225459 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user