[EJB/JBoss] - Re: 4.0.4.GA - @javax.persistence.OneToMany(mappedBy) - brok
by smix007
hello,
I have practically the same problem that you:
in TermProj
| public class TermProj implements Serializable {
|
| @EmbeddedId
| protected TermProjPK termProjPK;
| //join with TermSource
| @ManyToOne
| @JoinColumn (name = "AUIW")
| private TermSource auiw;
| public TermSource getAuiw() {
| return auiw;
| }
|
| public void setAuiw(TermSource auiw) {
| this.auiw = auiw;
| }
|
|
| //join with SnomedInter
| @ManyToOne
| @JoinColumn (name = "AUIS")
| private SnomedInter auis;
| public SnomedInter getAuis() {
| return auis;
| }
|
| public void setAuis(SnomedInter auis) {
| this.auis = auis;
| }
|
public class TermSource implements Serializable {
|
|
|
|
| @Id
| @Column(name = "AUIW", nullable = false)
| private String auiw;
| [...]
| @OneToMany(mappedBy="AUIW")
| private Collection<TermProj> termProjs;
|
| public Collection<TermProj> getTermProjs() {
| return termProjs;
| }
|
| public void setTermProjs(Collection<TermProj> termProjs) {
| this.termProjs = termProjs;
| }
| public class SnomedInter implements Serializable {
|
| @Id
| @Column(name = "AUIS", nullable = false)
| private String auis;
| [...]
| @OneToMany(mappedBy="AUIS")
| private Collection<TermProj> termProjs;
|
| public Collection<TermProj> getTermProjs() {
| return termProjs;
| }
|
| public void setTermProjs(Collection<TermProj> termProjs) {
| this.termProjs = termProjs;
| }
|
|
how you solved this problem please
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991238#3991238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991238
18 years, 1 month
[JBoss jBPM] - JMS TCP connections
by turcototo
Hi.
I need to implement an async path in my process and I decided to use a JMS queue and an MDB.
In an ActionHandler I have:
[...]
| public void execute(ExecutionContext context) throws Exception {
| ...
| long tid = context.getProcessInstance().getId();
| LocalCoreManager coreManager = lookupLocalCoreManager();
| coreManager.publish(tid, messageCode);
| ...
| JbpmContext jbpmContext = context.getJbpmContext();
| jbpmContext.close();
| }
At this point my process enter the Wait State "Queued", then, asynchronously, the MDB loads the process instance and signals it.
Everything seems to work ok BUT...I've noticed that I have dozens of open TCP connections to the port 8093.
This leads to an OutOfMemoryException on Windows and to a "too many files open in system" on linux.
The code of coreManager.publish is ok because if I call the bean from inside a Junit test I can publish and the connections are correctly closed. So it appears that the problem is to publish jms messages from inside jbpm.
Do you have suggestions?
Thankyou
Salvatore
P.S. I use jboss 4.0.4GA and jbpm 3.1.2 but I've tryed also jboss 4.0.5 and jbpm 3.1.3
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991233#3991233
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991233
18 years, 1 month
[EJB 3.0] - Re: EntityManager is loosing updates
by konstantin.ermakov
I added Version to my data and I did not receive any new exceptions. The only exception I can see in the JBoss log file is as following:
2006-12-05 11:18:36,674 DEBUG [org.jboss.mq.il.uil2.ServerSocketManagerHandler] Exiting on IOE
java.net.SocketException: socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
at org.jboss.util.stream.NotifyingBufferedInputStream.read(NotifyingBufferedInputStream.java:79)
at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2205)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2385)
at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2452)
at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2524)
at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2673)
at java.io.ObjectInputStream.readByte(ObjectInputStream.java:874)
at org.jboss.mq.il.uil2.SocketManager$ReadTask.run(SocketManager.java:317)
at java.lang.Thread.run(Thread.java:595)
And I do not think, that it is somehow connected to the problem. Did anyone met this problem before?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991229#3991229
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991229
18 years, 1 month
[Persistence, JBoss/CMP, Hibernate, Database] - Question for the BMP experts
by tknerr
Hello,
I have a question for the BMP experts out there:
We want to realize data access to a non-standard database, thus CMP does not work and we have to write our own SQL-like code to access it. It does not support transactions.
Now, the idea was to use BMP Entity beans to realize this scenario, but then I read about the N+1 problem (http://wiki.jboss.org/wiki/Wiki.jsp?page=AvoidBMP), which makes me think that BMP is probably not a good idea and that we better use Stateless Session Beans and ValueObjects instead.
However, someone told me that there are appserver-specific configuration to tune this behaviour, i.e. avoid the N+1 problem with BMP.
So here are my questions:
1) is there a JBoss specific workaround for the N+1 problem with BMP?
- Can you point me to documentation?
2) If I consider to use BMP (even with the N+1 issue), what would be the advantage over Stateless Session Beans + ValueObjects?
- will the container give me some extra functionality which I wouldn't have with SSB + VO?
- will the container give me support for transactions (which we do not have natively) by remembering calls to ejbCreate/Remove etc. and calling them in reverse order with the same PK?
Hope you have some helpful advice for me. I'm especially curios if we could inherit some functionality from the container with the BMP approach.
Thank you and best regards,
Torben
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3991220#3991220
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3991220
18 years, 1 month