[Messaging, JMS & JBossMQ] - Unable to Connect to Connection Factory
by gopal1.v@tcs.com
HI I am a newbie.to JBoss..I am using JbossIDE...JemsInstaller...
I selected ejb3.0 option while installing...
Here is my Client code which sends messages to JMS queue...
@Resource(mappedName = "java:JmsXA")
| private static ConnectionFactory connectionFactory;
| @Resource(mappedName = "queue/myqueue")
| private static Queue queue;
| public static void main(String[] args) {
| final int NUM_MSGS = 3;
| try {
| connection = connectionFactory.createConnection();
| session = connection.createSession(false,AUTO_ACKNOWLEDGE);
| messageProducer = session.createProducer(queue);
| message = session.createTextMessage();
|
| for (int i = 0; i < NUM_MSGS; i++) {
| message.setText("This is message " + (i + 1));
| System.out.println("Sending message: " + message.getText());
| messageProducer.send(message);
| }
|
But The ConnectionFactory object after @resource is null...
If i try to lookup using IntiallookUp()
it is giving this error:
JmsXA not bound
If i use ConnectionFactory in the place of JmsXA
It will give unmarshelled exception....
In the server side i am not using any deployment descriptor as i am using EJB3.0
MDB looks like this:
@MessageDriven(activationConfig =
| {
| @ActivationConfigProperty(propertyName="messagingType", propertyValue="javax.jms.MessageListener"),
| @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
| @ActivationConfigProperty(propertyName="Destination", propertyValue="testqueue"),
| @ActivationConfigProperty(propertyName="ConnectionFactoryName", propertyValue="ConnectionFactory"),
| @ActivationConfigProperty(propertyName="Transacted", propertyValue="true"),
| @ActivationConfigProperty(propertyName="Xa", propertyValue="true"),
| @ActivationConfigProperty(propertyName="DeliveryOption", propertyValue="B"),
| @ActivationConfigProperty(propertyName="SubscriptionDurability", propertyValue="Durable"),
| @ActivationConfigProperty(propertyName="MaxPoolSize", propertyValue="20"),
| @ActivationConfigProperty(propertyName="MaxMessages", propertyValue="1"),
| @ActivationConfigProperty(propertyName="resourceAdaptorName", propertyValue="swiftmq.rar")
| })
|
| public class AnnotatedTestMDBBean implements MessageListener {
|
| public void onMessage(Message arg0) {
| if(arg0 instanceof TextMessage){
| TextMessage tm = (TextMessage)arg0;
| try{
| String text = tm.getText();
| System.out.println("Received text:"+text);
| }catch(JMSException e){
| e.printStackTrace();
| }
| }
|
|
|
Is there anything i have to use....
Any links or tutorials are welcome....
Thanks in advance...
Gopal V
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046456#4046456
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046456
18 years, 11 months
[JBoss Portal] - Multiple region layouts in one portal
by hreintke
LS,
What I would like to achieve is having multiple region layouts in my portal.
For example one page having the standard 30-70% 2 column, another a 50-50 2 column and yet another a 30-30-30 3 column layout.
I have been experimenting with :
1/ create a new theme (a copy of an existing and update the css for the regionA and regionB.
But in this way you can never change the view of your portal anymore in a single (or limited) way. In fact you always have themes specific to pages instead of themes to a portal.
2/ Update a layout (f.e generic) to include more regions (regionA, regionB, RegionA50,regionB50, regionA30,regionB30,regionC30) and include defintions for these in the portal_style of f.e renaissance theme and include them in de index.jsp of the layout.
But this way, when placing portlet instances on a page you get all possible regions and really have to be carefull to only use the regions which are supposed to be used together.
Questions :
- Is there a way to limit the shown regions in the page layout edit page of the management portlet ?
- Is there a way to define the regions definitions in a "layout level" css, in the way I have it now, I need to update all themes to include all region definitions
- Are there other ways to accomplish my ideas ?
Kind regards,
Herman Reintke
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046455#4046455
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046455
18 years, 11 months
[JBoss jBPM] - org.hibernate.TransientObjectException object references an
by javi0704
Hello,
I've just started using JBPM and I'm trying to create new State between 2 task-nodes.At the beginning the processDefinition look like this:
1) start-state-->task-node1-->task-node2-->end-state
but i would like to create a new State to Runtime when between this 2 task-nodes violation occur. So my ProcessDefinition have then a new State like this:
2)start-state-->task-node1-->newstate-->task-node2-->end-state
When I try to run the process, I get the following exception. Can anyone help please? My code looks like this:
==========================
Node currentNode = executionContext.getNode();
System.out.println("!!!----WhoIsCurrentNode: " + currentNode.toString());
Transition oldTrans = currentNode.getDefaultLeavingTransition();#to next1
Node nextNode = oldTrans.getTo();
System.out.println("!!!---WhoIsnexttNode1: " +nextNode.toString());
State stateNode = new State("WaitState"); //create me new stateNode
Transition stateTrans = new Transition();
currentNode.addLeavingTransition(oldTrans);
oldTrans.setFrom(currentNode);
oldTrans.setTo(stateNode);
stateNode.addArrivingTransition(oldTrans);
stateNode.addLeavingTransition(stateTrans);
nextNode.addArrivingTransition(stateTrans);
stateTrans.setFrom(stateNode);
stateTrans.setTo(nextNode);
When I try to run the process, I get the following exception. Can anyone help please? using server (jbpm-starters-kit-3.1.3)
=================================
13:19:23,593 DEBUG [CommandExecutorThread] waiting for more messages
13:19:23,593 DEBUG [StaticNotifier] going to wait for (CMD_EXECUTOR, java.lang.O
bject@1bdcbb2)
13:19:23,593 DEBUG [DbPersistenceServiceFactory] creating persistence service
13:19:23,593 DEBUG [DbPersistenceService] creating hibernate session
13:19:23,593 DEBUG [DbPersistenceService] beginning hibernate transaction
13:19:23,593 DEBUG [SchedulerThread] checking for timers
13:19:23,593 DEBUG [JbpmContext] closing JbpmContext
13:19:23,593 DEBUG [Services] closing service 'persistence': org.jbpm.persistenc
e.db.DbPersistenceService@4e1a93
13:19:23,593 DEBUG [DbPersistenceService] committing hibernate transaction
13:19:23,593 DEBUG [DbPersistenceService] closing hibernate session
13:19:23,734 INFO [STDOUT] ci.getVariable("Number "): '1'
13:19:23,734 INFO [STDOUT] !!!----WhoIsCurrentNode: TaskNode(form)
13:19:23,734 INFO [STDOUT] !!!----WhoIsnexttNode1: TaskNode(After-form)
13:19:23,734 INFO [STDOUT] !!!T----WhoIsnexttNode2: State(WaitStateNode)
13:19:23,734 INFO [STDOUT] ================================================
13:19:23,734 INFO [STDOUT] ================================================
13:19:23,734 DEBUG [GraphElement] event 'transition' on 'Transition(to next1)' f
or 'Token(/)'
13:19:23,734 DEBUG [GraphElement] event 'node-enter' on 'State(WaitStateNode)'
for 'Token(/)'
13:19:23,734 DEBUG [GraphElement] event 'after-signal' on 'TaskNode(form)' for 'Token(/)'
13:19:23,734 DEBUG [TaskBean] assignmentlogs: []
13:19:23,734 DEBUG [Services] executing default save operations
13:19:23,734 DEBUG [HibernateSaveOperation] saving process instance
13:19:23,734 DEBUG [SaveLogsOperation] flushing logs to logging service.
13:19:23,750 DEBUG [CascadeSaveOperation] cascading save of 'org.jbpm.graph.exe.
ProcessInstance@19bc401'
13:19:23,750 INFO [[/jbpm]] WARNING: Component _id13 just got an automatic id,
because there was no id assigned yet. If this component was created dynamically
(i.e. not by a JSP tag) you should assign it an explicit static id or assign it
the id you get from the createUniqueId from the current UIViewRoot component rig
ht after creation!
13:19:23,750 ERROR [TaskMgmtSession] org.hibernate.TransientObjectException: obj
ect references an unsaved transient instance - save the transient instance befor
e flushing: org.jbpm.graph.node.State
13:19:23,750 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.faces.el.EvaluationException: Cannot get value for expression '#{homeBean.
taskInstances}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java
:399)
at javax.faces.component.UIData.getValue(UIData.java:779)
at javax.faces.component.UIData.createDataModel(UIData.java:545)
at javax.faces.component.UIData.getDataModel(UIData.java:534)
at javax.faces.component.UIData.getRowCount(UIData.java:103)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeInnerHt
ml(HtmlTableRendererBase.java:124)
at org.apache.myfaces.renderkit.html.HtmlTableRendererBase.encodeChildre
n(HtmlTableRendererBase.java:94)
Thank you,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046453#4046453
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046453
18 years, 11 months
[JBoss Seam] - Seam and Web-Services Problem
by fbenvegna
I have SEAM 1.2.1GA, JBoss 4.0.5GA and JBossWS 1.2.1GA.
I have a web-services in my application.
Strange behaviour:
- first time deploy application and start Jboss:
....
| [WSDLFilePublisher] WSDL published to: file:/C:/jboss-4.0.5.GA/server/default/data/wsdl/Middleware.ear/Middleware.war/MiddlewareService36655.wsdl
| ...
It's OK.
- shutdown JBoss
- restart JBoss but no message about WSDL publication. Web-service is down. I need to redeploy my application to run web-services or touch web.xml and run ant restart.
This behaviour is only with SEAM. I have another application with web-services and it's ok after shutdown and restart.
Web-Services servlet-mapping is:
<servlet-mapping>
| <servlet-name>Services</servlet-name>
| <url-pattern>/web-services/*</url-pattern>
| </servlet-mapping>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046450#4046450
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046450
18 years, 11 months
[JBossCache] - JBossCache on JBoss Application Server
by alohamojo
Hi,
I want to run JBossCache on JBoss AS, and i have done as the guide "Running JBoss Cache within JBoss Application Server". That means i have copied jboss-cache.jar to /lib folder and configuration file to /deploy folder. And at client side, i created a class like this:
...
MBeanServer server=MBeanServerLocator.locateJBoss();
PojoCacheMBean cache; cache=(PojoCacheMBean)MBeanProxyExt.create(PojoCacheMBean.class, "jboss.cache:service=TreeCache", server);
...
But when i ran this class, it report an error:
java.lang.IllegalStateException: No 'jboss' MBeanServer found!
at org.jboss.mx.util.MBeanServerLocator.locateJBoss(MBeanServerLocator.java:110)
What was i wrong ?
Please give me the detail how to deploy JBossCache on JBoss AS.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046449#4046449
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046449
18 years, 11 months