[JBoss JIRA] Created: (EJBTHREE-1188) Deployment of @ManyToMany fails.
by Alexander Tsirel (JIRA)
Deployment of @ManyToMany fails.
--------------------------------
Key: EJBTHREE-1188
URL: http://jira.jboss.com/jira/browse/EJBTHREE-1188
Project: EJB 3.0
Issue Type: Bug
Components: EJB3 Extensions
Affects Versions: AS 4.2.1.GA
Environment: JBoss Bootstrap Environment
JBOSS_HOME: C:\jboss-4.2.1.GA
JAVA: C:\Program Files\Java\jdk1.5.0_09\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
CLASSPATH: C:\Program Files\Java\jdk1.5.0_09\lib\tools.jar;C:\jboss-4.2.1.GA\bin\run.jar
Reporter: Alexander Tsirel
Two entities relates as many to many (Course and Student).
During deployment it throws:
Caused by: org.hibernate.MappingException: Could not determine type for: java.util.Collection, for columns: org.hibernate.mapping.Column(students)]
Both sides using Generics.
Here is the latest code:
@Entity(name = "StudentUni")
public class Student implements Serializable {
private int id;
private String name;
private Collection<Course> courses = new ArrayList<Course>();
public Student(){
id = (int) System.nanoTime();
}
@Id
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@ManyToMany
public Collection<Course> getCourses() {
return courses;
}
public void setCourses(Collection<Course> courses) {
this.courses = courses;
}
}
@Entity(name = "CourseUni")
public class Course implements Serializable {
private int id;
private String courseName;
private Collection<Student> students = new ArrayList<Student>();
public Course(){
id = (int) System.nanoTime();
}
@Id
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getCourseName() {
return courseName;
}
public void setCourseName(String courseName) {
this.courseName = courseName;
}
@ManyToMany(mappedBy = "courses")
public Collection<Student> getStudents() {
return students;
}
public void setStudents(Collection<Student> students) {
this.students = students;
}
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months
[JBoss JIRA] Created: (JGRP-683) Provide hooks to enable creation of all daemon threads
by Bela Ban (JIRA)
Provide hooks to enable creation of all daemon threads
------------------------------------------------------
Key: JGRP-683
URL: http://jira.jboss.com/jira/browse/JGRP-683
Project: JGroups
Issue Type: Task
Reporter: Bela Ban
Assigned To: Bela Ban
Fix For: 2.6.2, 2.7
Goal: to enable a developer to setup JGroups to use only daemon threads. Default will still be that IO bound threads are non-daemons
Jon Richards wrote:
> It works OK for the thread pools used by TP but a couple of problems:
>
> Problem 1: I need to kludge it a bit: it turns out that I need to do a
> channel.connect() before I can modify/set the TP thread pools because
> the thread pools are created in TP.start(). This means that non-daemon
> threads can get created before I have a chance to modify the setting.
What if I check in TP.start() if thread_pool/oob_thread_pool is already set and don't create a thread pool of already set ? Then you could create a JChannel, set the thread pool(s) and then call JChannel.connect().
> Problem 2: there are other threads at the transport level that get
> created using ProtocolStack.getThreadFactory() and there is not way to
> override how this thread factory gets created.
I could provide setters for the 2 thread factories in ProtocolStack and make them non-final. Would that help ?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months
[JBoss JIRA] Created: (JBMESSAGING-1227) Statement leak in HandleBeforeCommit1PCRunner
by Kevin Conner (JIRA)
Statement leak in HandleBeforeCommit1PCRunner
---------------------------------------------
Key: JBMESSAGING-1227
URL: http://jira.jboss.com/jira/browse/JBMESSAGING-1227
Project: JBoss Messaging
Issue Type: Bug
Affects Versions: 1.4.0.SP3
Reporter: Kevin Conner
Assigned To: Tim Fox
Priority: Blocker
>From JBESB-1450
"This leak appears to be coming from JBoss Messaging, specifically JDBCPersistenceManager$1HandleBeforeCommit1PCRunner.doTransaction(JDBCPersistenceManager.java:1587)
This line creates a prepared statement within a loop but only the last statement created will be released. Other examples of this construct, within this file, use a simple guard to prevent subsequent allocations. This appears to be the only occurrence which does not."
"The following change fixes the leak.
Index: src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java
===================================================================
--- src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java (revision 3648)
+++ src/main/org/jboss/messaging/core/impl/JDBCPersistenceManager.java (working copy)
@@ -1584,8 +1584,11 @@
ChannelRefPair pair = (ChannelRefPair) i.next();
MessageReference ref = pair.ref;
- psReference = conn
+ if (psReference == null)
+ {
+ psReference = conn
.prepareStatement(getSQLStatement("INSERT_MESSAGE_REF"));
+ }
// Now store the reference
addReference(pair.channelID, ref, psReference, false);
"
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
18 years, 3 months