[JBoss jBPM] - Re: Beginner Problem: BPEL Extension Problem deploying Hello
by alex.guizar@jboss.com
When you run build.service.XXX multiple times, Ant is smart enough not to rebuild the archive. This might be why you do not see the following line:
[jar] Building jar: .../jbpm-bpel.sar
Your process is being deployed properly :-) The note at the end of section 5.1.3 of the user guide clarifies this situation:
anonymous wrote : Note
|
| If this is the first process you deploy after starting the jBPM service, you will see a flurry of logs from Hibernate before the last log shown above. This is normal as long as no ERROR entries appear. Hibernate initializes on demand.
The "last log shown above" corresponds to:
23:55:22,250 INFO [[/jbpm-bpel]] processDeployServlet: deployed process definition: HelloWorld
This matches the last entry of your output. Furthermore, I see no ERROR entries. Please regard this as normal behavior.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977926#3977926
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977926
19 years, 7 months
[JBoss Messaging] - configuring remote host and port
by sridummy
Hi
Im using Jboss4.0.3SP1, Im very new to JMS&MDB's. I have written a MDB and a client which subscribes the msgs. I have to connect to the remote Topic which is in Seebeyond very old version and didnt have jndi.
The following is the code which i implemented for connecting to remote topic and ejb-jar.xml, jboss.xml
Im unable to listen to the messages after deploying the jar file.
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.Topic;
import javax.jms.TopicConnection;
import javax.jms.TopicConnectionFactory;
import javax.jms.TopicPublisher;
import javax.jms.*;
import javax.ejb.*;
import javax.jms.TopicSession;
import javax.jms.TextMessage;
import com.seebeyond.jms.client.STCTopicConnectionFactory;
import com.seebeyond.jms.message.STCBytesMessage;
import com.seebeyond.jms.message.STCTextMessage;
/**
* @ejb.bean name="MyMBD1"
* display-name="Name for MyMBD1"
* description="Description for MyMBD1"
* destination-type="javax.jms.Topic"
* acknowledge-mode="Auto-acknowledge"
*/
public class MyMBD1 implements MessageDrivenBean, MessageListener {
MessageDrivenContext context = null;
String topicName = "etXMLShipmentOrder";
TopicConnectionFactory tcf = null;
TopicConnection topicConnection = null;
TopicSession topicSession = null;
Topic topic = null;
TopicSubscriber topicSubscriber = null;
STCBytesMessage message = null;
InputStreamReader inputStreamReader = null;
char answer = '\0';
String hostName = "egludev07";
int port = 24820;
public MyMBD1() {
super();
System.out.println("Topic name is " + topicName);
// TODO Auto-generated constructor stub
}
public void setMessageDrivenContext(MessageDrivenContext context)
throws EJBException {
this.context = context;
System.out.println("Insdie setMessageDrivenContext ");
}
public void ejbRemove() throws EJBException {
System.out.println("ejbRemove ");
context = null;
if (topicConnection != null) {
try {
System.out.println("... Closing connection ...");
topicSession.commit();
topicConnection.close();
}catch(JMSException e){
System.out.println("Inside ejbRemove catch block ");
e.printStackTrace();
}
}
}
public void onMessage(Message message) {
System.out.println("onMessage");
STCTextMessage msg = null;
//final int MAX_MESSAGE_SIZE = 60;
try {
if (message instanceof TextMessage) {
msg = (STCTextMessage) message;
System.out.println(
"... Reading message: " + msg.getText());
} else {
System.out.println(
"Message of wrong type: "
+ message.getClass().getName());
}
topicSession.commit();
} catch (Exception e) {
System.out.println(
" JMSException in onMessage(): " + e.toString());
} catch (Throwable te) {
System.out.println(
"Exception in onMessage():" + te.getMessage());
}
}
/**
* Default create method
*
* @throws CreateException
*/
public void ejbCreate() {
System.out.println("Inside ejbCreate ");
try {
tcf = new STCTopicConnectionFactory(hostName, port);
topicConnection = tcf.createTopicConnection();
topicConnection.start();
topicSession =
topicConnection.createTopicSession(
true,
Session.AUTO_ACKNOWLEDGE);
topic = topicSession.createTopic(topicName);
topicSubscriber = topicSession.createDurableSubscriber(topic,"EAI_TEST_DURABLE");
} catch (Exception e){
System.out.println("Inside ejbCreateException Block "+e.getMessage());
e.getStackTrace();
}
}
}
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar >
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB1</ejb-name>
<ejb-class>com.eagle.mdb.MyMBD1</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>jms/JmsXA</res-ref-name>
<res-type>javax.jms.TopicConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
jboss.xml
<?xml version="1.0" encoding="UTF-8"?>
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB1</ejb-name>
<destination-jndi-name>topic/testTopic</destination-jndi-name>
<resource-ref>
<res-ref-name>jms/JmsXA</res-ref-name>
<jndi-name>TopicConnectionFactory</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
For my senario, pls guide me. Its very urgent.
Thanks in Advance
Sri
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977923#3977923
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977923
19 years, 7 months
[EJB 3.0] - EJB3 business delegates?
by meselfe
What happens if i build a business delegate that caches the reference to the session bean? Will this lock down the session bean for as long as the reference exists. I think for stateless session beans im not guarantied that my invocation on the session bean is always serviced by the same bean instance althoug the reference is the same, correct? So is caching the reference safe? I still want my pool of session beans to service a larger number of clients than there are beans in the pool - so i dont want to lock down any particular session bean instance for one particular client.
My client is web/struts. If its possible to hold on to the business delegate with the cached reference to the session bean between http requests? Which is the beast way to do this?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977921#3977921
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3977921
19 years, 7 months