[JBoss Messaging] - Re: 1.2.0.GA transparent node failover does not always work
by bander
"timfox" wrote : I think the root of this problem is you are not using JBoss Messaging's transparent failover abilities but are catching exceptions yourself and recreating connections manually (which is unnecessary for JBM but necessary for other messaging systems which don't support transparent failover), and this is interacting badly with the transparent failover.
If failover is transparent I would have thought there would be no exceptions to catch (in our code), unless the failover itself failed and the requested operation could not be performed by any node in the cluster.
We're catching the exceptions thrown by the JMS API calls we make. Isn't it part of the JMS spec that we have to catch exceptions ourselves?
The JMS API for Connection says
anonymous wrote : If a JMS provider detects a serious problem with a connection it will inform the connection's ExceptionListener if one has been registered. It does this by calling the listener's onException() method passing it a JMSException describing the problem.
|
| This allows a client to be asynchronously notified of a problem. Some connections only consume messages so they would have no other way to learn their connection has failed.
|
| A Connection serializes execution of its ExceptionListener.
|
| A JMS provider should attempt to resolve connection problems itself prior to notifying the client of them.
|
What action can we realistically take if the connection exception listener tells us there is a problem? The simplest thing to do is attempt to close the connection and obtain a new one.
If you're saying that we should not be recreating connections manually with JBM then our JMS code will no longer be generic - it will be tied to JBM. This is not desirable.
"timfox" wrote :
| This is a somewhat unusual use case but I admit it should work.
I'm surprised you consider it unusual. I would have thought our main requirement is a common one: we need to be able to restart our messaging servers in a production environment independently from our web application (which is likely to be running on a separate server). When the messaging servers are stopped the messaging infrastructure in our web application must be able to disconnect. When the messaging servers are restarted our messaging infrastructure must be able to reconnect and begin processing messages again (i.e. recreate the consumers and producers).
Maybe it would be easier if you showed me what the test case should look like i.e. your challenge is to write a test case that will successfully dispatch and receive messages when a JMS server is available - and continues to run when a JMS server is not available!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026845#4026845
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026845
19Â years, 1Â month
[Persistence, JBoss/CMP, Hibernate, Database] - how to do a subquery in JBoss?
by qixiang_nj
Hi, all
now, I need to do a subquery like this:
SELECT OBJECT(a) FROM SelectedRecs a WHERE a.sID2 IN (SELECT b.SID2 FROM SessionView b WHERE (b.LocalIP='213.114.83.134' AND b.RmtIP='137.72.43.114') OR (b.LocalIP='137.72.43.114' AND b.RmtIP='213.114.83.134'))
note that: SessionView is another table. now I just write an entitybean for table SelectedRecs, not for it.
when I run the demo using the EJB-QL above, it met some problems.
so I wanna know how to do a subquery in JBoss, and the subquery is from another table. please give me a suggestion, thanks a lot.
my msn is: qixiangnj AT gmail DOT com.
Best Regards,
Thomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026843#4026843
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026843
19Â years, 1Â month
[EJB 3.0] - Re: EJB 2.1 and 3.0 in one web-app
by arisa
I too am researching mixing EJB 2.1 and 3.0 Beans in the same .jar file. I have verified that you can mix EJB2.1 SLSB and EJB3 SLSB in the same .jar file. Unit tests verified that they work perfectly together.
HOWEVER, currently I am not able to mix EJB2.1 entities with EJB3 entities.
* If persistence.xml is placed inside the .jar file, then the EJB3 deployer kicks in and only EJB3 entity beans are deployed.
* If I remove the persistence.xml file, then the normal deployment takes place and only my EJB2.1 entity beans are deployed.
It would be really really great if someone could shed light on this issue. I'm sure there are many of us who want to upgrade to EJB3 but can only do so partially (and is one of the objectives of EJB3 to allow interoperability if I'm not mistaken). It would be a problem if EJB2.1 and EJB3 entities had to be packaged in different .jar files as I would not be able to implement CMR between those entities.
Thanks very much in advance.
ps. sorry for the same posting to two different forum messages, as they are similar.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026842#4026842
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026842
19Â years, 1Â month
[EJB 3.0] - Re: Package ejb2.1 entities along with ejb3.0 session deans
by arisa
I too am researching mixing EJB 2.1 and 3.0 Beans in the same .jar file. I have verified that you can mix EJB2.1 SLSB and EJB3 SLSB in the same .jar file. Unit tests verified that they work perfectly together.
HOWEVER, currently I am not able to mix EJB2.1 entities with EJB3 entities.
* If persistence.xml is placed inside the .jar file, then the EJB3 deployer kicks in and only EJB3 entity beans are deployed.
* If I remove the persistence.xml file, then the normal deployment takes place and only my EJB2.1 entity beans are deployed.
It would be really really great if someone could shed light on this issue. I'm sure there are many of us who want to upgrade to EJB3 but can only do so partially (and is one of the objectives of EJB3 to allow interoperability if I'm not mistaken). It would be a problem if EJB2.1 and EJB3 entities had to be packaged in different .jar files as I would not be able to implement CMR between those entities.
Thanks very much in advance.
ps. sorry for the same posting to two different forum messages, as they are similar.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026841#4026841
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026841
19Â years, 1Â month
[EJB 3.0] - ejb3 - setList(Set<MyObjs> list) - fails to persist.
by hanasakijiji
reload the instance and call getList returns empty list.
|
| @OneToMany(
| cascade= {CascadeType.ALL, CascadeType.ALL}
| fetch=FetchType.EAGER)
| @JoinTable(
| name="myjointable",
| joinColumns={ @JoinColumn(name="owner_fk") }
| inverseJoinColumn=@JoinColumn(name="owned_fk")
| public Set<OwnedItem> getOwnedItems() {
| return(ownedItems);
| }
|
| private Set<OwnedItem> ownedItems = new HashSet<OwnedItem>();
|
////
Q1: the cascade type in OneToMany can either be an array, as above, or a
single item. Both compile. Both are in the hibernate annotations docs;
however I do not find an explanation of the types or when to use an
array and when not to (also how many items to put in the array and their
meaning). Could someone explain this and point to reference docs?
Q2: the above class was instantiated and persisted fine. Now it is
loaded with an Query and the following is done:
myObject.getOwnedItems.add(unsavedNewOwnedItem);
em.flush();
- Does the unsavedNewOwnedItem need to be persisted first?
- what happens if it is not persisted yet?
- what happens if it is already persisted?
I have tried this withe the new owned item instanced already saved and
not yet saved/persisted. The join table appears to be updated; however,
when the class is reloaded, by a call to a new session bean (used by a
subsequent call to a servlet), the Set is empty. It is expected to
contain the item that was added.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026839#4026839
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026839
19Â years, 1Â month
[JNDI/Naming/Network] - NamingException:Recieve timed out
by paras.java
I get the following error:
11:24:49,485 INFO [STDOUT] Naming ExceptionReceive timed out
11:24:49,485 INFO [STDOUT] connection created
11:24:49,565 INFO [STDOUT] 11:24:49,555 ERROR [CPLogger] SSO Id :: [] - Class N
ame [UserSetupImpl] - Method Name (populateDropDowns) - Message { CPException :
null }
11:24:49,575 INFO [STDOUT] 11:24:49,575 ERROR [CPLogger] SSO Id :: [] - Class N
ame [UserSetupImpl] - Method Name (populateDropDowns) - Message { CPException :
null }
11:24:49,575 INFO [STDOUT] 11:24:49,575 ERROR [CPLogger] SSO Id :: [] - Class N
ame [class com.ge.comfin.cp.common.dao.DropdownValuesDAO] - Method Name (getAggr
egationPeriod()) - Message { Exception : null }
11:24:49,575 INFO [STDOUT] inside exception
11:24:49,585 INFO [STDOUT] inside finally
11:24:49,955 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Define tag cannot set a null value
at org.apache.struts.taglib.bean.DefineTag.doEndTag(DefineTag.java:236)
at org.apache.jsp.view.jsp.UserSetup_jsp._jspService(org.apache.jsp.view
.jsp.UserSetup_jsp:363)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper
.java:322)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:3
14)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:173)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDisp
atcher.java:672)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(Applica
tionDispatcher.java:463)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationD
ispatcher.java:398)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDis
patcher.java:301)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.
java:1063)
********************************
Please let me know the solution.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026838#4026838
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026838
19Â years, 1Â month