[Installation, Configuration & Deployment] - Re: ERROR [AjpMessage] Invalid message recieved with signatu
by john_es
I run ant ear and that gives me:
| jespi@myproj-dev:~/myprojDev/workingfolder/trunk$ ant ear
| Buildfile: build.xml
|
| generate:
| [ejbdoclet] (XDocletMain.start 47 ) Running <entitycmp/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <session/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <localinterface/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <localhomeinterface/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <valueobject/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <utilobject/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <deploymentdescriptor/>
| [ejbdoclet] (XDocletMain.start 47 ) Running <jboss/>
|
| compile:
|
| jar:
|
| war:
|
| ear:
| [ear] Building ear: /home/jespi/myprojDev/workingfolder/trunk/dist/myproj.ear
|
| BUILD SUCCESSFUL
| Total time: 32 seconds
|
then in /opt/jboss/server/myproj I see:
| jespi@myproj-dev:/opt/jboss/server/myproj
| $ ls -la
| total 36
| drwxr-xr-x 9 jespi jespi 4096 2009-10-31 22:53 .
| drwxr-xr-x 6 jespi jespi 4096 2009-10-31 22:42 ..
| drwxr-xr-x 4 jespi jespi 4096 2009-10-31 22:42 conf
| drwxr-xr-x 5 jespi jespi 4096 2009-10-31 22:53 data
| drwxr-xr-x 12 jespi jespi 4096 2009-10-31 22:43 deploy
| drwxr-xr-x 2 jespi jespi 4096 2009-10-31 22:57 lib
| drwxr-xr-x 2 jespi jespi 4096 2009-11-03 09:54 log
| drwxr-xr-x 3 jespi jespi 4096 2009-11-03 15:04 tmp
| drwxr-xr-x 3 jespi jespi 4096 2009-10-31 22:53 work
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263713#4263713
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263713
15 years
[EJB 3.0 Users] - Re: EJB3.0 MDB example
by rodedh
You can use Message Driven POJOs.
| import org.jboss.annotation.ejb.DeliveryMode;
| import org.jboss.annotation.ejb.MessageProperties;
| import org.jboss.annotation.ejb.Producer;
|
| @Producer(connectionFactory="java:/JmsXA")
| @MessageProperties(delivery=DeliveryMode.NON_PERSISTENT, timeToLive=0, priority=1)
| public interface MyProcessor {
| public void processSomething(Serializable anyParameter);
| }
|
and the implementing class:
| import java.io.BufferedInputStream;
| import java.io.File;
| import java.io.FileOutputStream;
| import java.io.InputStream;
| import java.net.URL;
| import java.net.URLConnection;
| import java.util.Collection;
| import java.util.Date;
|
| import javax.ejb.ActivationConfigProperty;
| import javax.ejb.EJB;
| import javax.ejb.TransactionAttribute;
| import javax.ejb.TransactionAttributeType;
|
| import org.jboss.annotation.ejb.Consumer;
| import org.jboss.annotation.ejb.PoolClass;
| import org.jboss.logging.Logger;
|
| import com.bulloons.server.dataCollector.omgili.entities.Document;
|
| @Consumer(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/MyTasksProcess"),
| @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "8"),
| @ActivationConfigProperty(propertyName = "minSession", propertyValue = "1"),
| @ActivationConfigProperty(propertyName = "maxMessages", propertyValue = "1") })
| @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
| @PoolClass(value = org.jboss.ejb3.StrictMaxPool.class, maxSize = 8 , timeout = (1000 * 60 * 60))
| // 10 minutes waiting for a pooled MDB. * 8 Concurrent Threads allowed,
| public class MyProcessorMDBean implements Downloader {
|
| public void processSomething(Serializable anyParameter){
| //Do the actual processing
| }
|
| }
|
And a client:
| import java.io.BufferedReader;
| import java.io.InputStreamReader;
| import java.net.URL;
| import java.util.ArrayList;
| import java.util.Collection;
| import java.util.Date;
| import java.util.List;
| import java.util.regex.Matcher;
| import java.util.regex.Pattern;
|
| import javax.annotation.PostConstruct;
| import javax.annotation.Resource;
| import javax.ejb.EJBException;
| import javax.ejb.SessionContext;
| import javax.ejb.Stateless;
| import javax.jms.JMSException;
| import javax.naming.InitialContext;
|
| import org.jboss.ejb3.mdb.ProducerManager;
| import org.jboss.ejb3.mdb.ProducerObject;
| import org.jboss.logging.Logger;
|
| @Stateless
| public class SomeBean implements SomeLocal, SomeRemote {
|
| //Inject A session contet resource from which the JMS Producer will be created.
| @Resource
| private SessionContext sessionCtx;
|
| public void callTheAThreadedProcess() {
| ProducerManager manager = null;
| MyProcessor myProcessor = null;
| try {
| myProcessor = (MyProcessor) sessionCtx.lookup(MyProcessor.class.getName());
| // Make the connection to the JMS Queue as producer
| ProducerObject po = (ProducerObject) myProcessor;
| manager = po.getProducerManager();
| manager.connect();
| String mySeriazableParam= "hello";
| myProcessor. processSomething(mySeriazableParam);
| } catch (Exception e) {
| log.error("Some Error Occured", e);
| } finally {
| try {
| manager.close();
| } catch (JMSException e) {
| log.error(e);
| }
| }
| }
|
Note that in Jboss 5 queues are not created automatically and need to be defined in: /deply/messaging/destinations-service.xml
| <mbean code="org.jboss.jms.server.destination.QueueService"
| name="jboss.messaging.destination:service=Queue,name=post_2_analysts_finder"
| xmbean-dd="xmdesc/Queue-xmbean.xml">
| <depends optional-attribute-name="ServerPeer">
| jboss.messaging:service=ServerPeer
| </depends>
| <depends>jboss.messaging:service=PostOffice</depends>
| <attribute name="JNDIName">queue/MyTasksProcess </attribute>
| <attribute name="RedeliveryDelay">10000</attribute>
| <attribute name="MaxDeliveryAttempts">3</attribute>
| </mbean>
|
Find complete example at:
[url]
http://www.commonj.com/blogs/?p=263
[/url]
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263711#4263711
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263711
15 years
[JBoss Messaging Users] - Once again: Could not find new XAResource to use for recover
by uiterlix
Hi,
I've been searching the forums quite extensively on the following warning message.
| WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 30, 28, 1-7f000101:da3f:4af020b2:6a6ec7f000101:da3f:4af020b2:6a6f0 >
|
I have two Jboss 4.2.3.GA application servers running JBoss messaging 1.4.4.GA and I have set up a message bridge between them.
Whenever I break the bridge by killing the target server instance, and restart the target server instance to restore the bridge, these warnings start to appear.
As advised in other posts I added the following lines to conf/jbossjta-properties.xml
| <property name="com.arjuna.ats.jta.recovery.XAResourceRecovery.JBMESSAGING1"
| value="org.jboss.jms.server.recovery.MessagingXAResourceRecovery;java:/DefaultJMSProvider"/>
|
I do have a default JMS provider configured.
What should I do with these messages ? They are worrying me since I don't want to lose any transactions in production.
Is there anyone who can truly shed some light on to this subject.
Thanks,
Xander
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263703#4263703
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263703
15 years
[jBPM Users] - Re: EventListener questions
by sebastian.s
This works for me. Note that I am using the process engine built by the default configuration which is stored in a static field in Configuration.
| public class ApprovalListener implements EventListener {
|
| private static final long serialVersionUID = 1L;
|
| @Override
| public void notify(EventListenerExecution execution) throws Exception {
| ProcessEngine processEngine = Configuration.getProcessEngine();
| HistoryService historyService = processEngine.getHistoryService();
| HistoryTask task = HistoryService.createHistoryTaskQuery().executionId(execution.getId()).uniqueResult();
|
| // now I can retrieve the information I wanted ..
| task.getAssignee()
| task.getCreateTime()
| ..
| }
|
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263700#4263700
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263700
15 years
[Performance Tuning] - Re: JBoss 5.1.0.GA performance tuning
by PeterJ
anonymous wrote : But I did not see tuning Connection pools and exact file and what parameters need to change
Section 14.6.1, configuring datasources
anonymous wrote : Thread pools
Section 14.6.2, Configuring the HTTP request thread pool
anonymous wrote : Object/Component pools
If all access is via a web app, the HTTP thread pools are all you need - all objects and component are access via on the HTTP threads.
anonymous wrote : is there any way we can decide number of connection pools(min, max etc.) number of threads, min and max cache size etc..
Yes, by running performance tests. See section 14.2. Once you know the performance aspects of your application, then you will be able to "decide number of connection pools(min, max etc.) number of threads, min and max cache size etc.. based on the number of incoming requests/out going responses"
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263699#4263699
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263699
15 years