[JCA/JBoss] - Re: Siebel Resource Adapter for JBoss
by mandarkul
I am doing everything whatever you have mentioned in ur response.Going further I have switched on the "TRACE" level debugging.I can see the following message in the log file while JBoss is establishing the connection,
2007-02-27 11:58:51,876 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] registering connection from org.jboss.resource.connectionmanager.NoTxConnectionManager@1670cc6, connection : de.chs.siebel.jca.SiebelConnection@dc420b, key: null
If I check the source code of "CachedConnectionManager" I can see this logging in "registerConnection" method of the same class.In the same method I can see an if loop as,
if (key == null)
return; //not participating properly in this management scheme.
Now If you look at the TRACE log we can surely say that a null key is passed to the "registerConnection" method. Hence I am totally confused to see what JBoss is doing and what is expected output. Do I need to configure somewhere that my RA must use a NoTxConnectionManager ?
Also when the connection is closed I can see the following log message generated,
2007-02-27 11:58:51,891 TRACE [org.jboss.resource.connectionmanager.CachedConnectionManager] unregistering connection from org.jboss.resource.connectionmanager.NoTxConnectionManager@1670cc6, object: null, key: null
| 2007-02-27 11:58:51,891 INFO [org.jboss.resource.connectionmanager.NoTxConnectionManager] Unregistered handle that was not registered! null for managedConnection: de.chs.siebel.jca.SiebelManagedConnection@65ab77
Can you guide me to solve this problem ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022881#4022881
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022881
19Â years, 1Â month
[EJB 3.0] - @ManyToOne results in tinyblob
by hispeedsurfer
Hi,
I'am working on JBoss-4.0.5.GA with EJB3 on MySQL.
Why a @ManyToOne join result in a tinyblob instead of a foreign-key?
My entities are a Baseentity and some derived classes with such @ManyToOne connections.
Here the BaseEntity
@MappedSuperclass
| public abstract class BaseEntity implements Serializable{
|
| @Column(name="__UUID__", unique=true, nullable=false, updatable=false, length=36)
| protected String internalUUID;
|
|
| protected Long id;
| protected Integer version;
|
| @Id @GeneratedValue
| protected Long getId(){
| return id;
| }
|
| protected void setId(Long id){
| this.id = id;
| }
|
| @Version
| protected Integer getVersion(){
| return version;
| }
| public void setVersion(Integer version) {
| this.version = version;
| }
|
| public BaseEntity(){
| this.internalUUID = java.util.UUID.randomUUID().toString();
| }
|
| @Override
| public boolean equals(Object o) {
| return (o == this || (o instanceof BaseEntity && internalUUID.equals(((BaseEntity)o).internalUUID)));
| }
|
| public String toString() {
| return getClass().getSimpleName() + " Id: " + getId();
| }
|
| @Override
| public int hashCode() {
| return internalUUID.hashCode();
| }
|
|
| }
a derived class
@Entity
| @Name("generation")
| @Table(name="generations")
| @SuppressWarnings("unused")
| public class Generation extends BaseEntity {
|
| /**
| *
| */
| private static final long serialVersionUID = 6004105498293729499L;
| private String name;
|
| /**
| *
| */
| public Generation() {
| // TODO Auto-generated constructor stub
| }
| public String getName() {
| return name;
| }
| public void setName(String name) {
| this.name = name;
| }
| }
and the class with manytoone relation
@Entity
| @Name("specialrelease")
| @Table(name="specialreleases")
| @SuppressWarnings("unused")
| public class SpecialRelease extends BaseEntity {
|
| /**
| *
| */
| private static final long serialVersionUID = -8813581197028149761L;
| static final int NOTRELEASED = 1;
| static final int NOTPERMITTED = 2;
| static final int ONDEMAND = 3;
| static final int DECLINED = 4;
| static final int EXPIRED = 5;
| static final int NOTVALID = 6;
|
|
| //@NotNull
| private Long requestNumber;
|
|
| private String description;
|
| @ManyToOne
| private Generation generation;
|
|
| /**
| *
| */
| public SpecialRelease() {
| // TODO Auto-generated constructor stub
| status = NOTRELEASED; //Genemhmigungsprozess noch nicht gestartet
| }
|
|
| public Generation getGeneration() {
| return generation;
| }
|
| public void setGeneration(Generation generation) {
| this.generation = generation;
| }
| }
|
Even I tried to put "@JoinColumn(name="generation_id", referencedColumnName="id")" to the relation the result is the same.
An idea what I can to to avoid the tinyblob?
Thanks
Andreas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4022876#4022876
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4022876
19Â years, 1Â month