[JBoss-user] [EJB 3.0] - Re: Using @SequenceGenerator ...

2006-06-16 Thread atodorov
Any ideas?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3951325#3951325

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3951325


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Using @SequenceGenerator ...

2006-06-15 Thread atodorov
Hi there!

I'm using JBoss 4.0.4.GA + Oracle 10g and an individual sequence for the PKs of 
each enity. In some entities I need to init several fixed records with known 
identities. So I prefer to use low values for the reserved primary keys (let's 
say between 1 and 100) and use greater identities for the dynamic data that is 
going to be inserted during the regular app work... 

1. Is there a way to use the @GeneratedValue annotation, but override its 
behaviour when it comes to the fixed records? If I manually set the ID before 
trying to persist or inside a @PrePersist callback, Hibernate designedly raises 
an exception. So I can omit the @GeneratedValue and set the id always manually 
(getting the sequence NEXTVAL when necessary), but it is not the cleanest way 
to achieve the goal. Is there some better way?

2. To reserve some range for the initial identities, the initialValue 
attribute in the @SequenceGenerator annotation would be a perfect solution, but 
it does not seem to work?


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3951053#3951053

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3951053


___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: @OrderBy does not work as expected?

2006-05-19 Thread atodorov
That's right... I just moved to the 4.0.4.GA version and it appears to work 
properly.

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3944870#3944870

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3944870


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: @OrderBy does not work as expected?

2006-05-18 Thread atodorov
Any ideas?
Is it a bug or I'm doing something wrong?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3944555#3944555

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3944555


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Oracle10g dialect

2006-05-17 Thread atodorov
Just curious... why do you need to persist the NaN values?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3944180#3944180

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3944180


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - @OrderBy does not work as expected?

2006-05-17 Thread atodorov
I have an entity bean, which has a @ManyToMany association to itself. But it 
appears that the @OrderBy annotation is not functioning in this case... (no 
exceptions - just the result is not sorted at all)

Example:

@Entity
  | public class Client implements Serializable {
  | 
  | private ListClient partners;  
  | 
  | //.
  | 
  | @ManyToMany
  | @OrderBy(name) // I tried different fields, but no effect... 
  | // the default should sort by id, but it doesn't work 
either
  | public ListClient getPartners() {
  | return partners;
  | }
  | 
  | public void setPartners(ListClient partners) {
  | this.partners = partners;
  | }
  | 
  | }

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3944225#3944225

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3944225


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: ora-00972

2006-05-16 Thread atodorov
Well.. unfortunately Oracle will not allow you to use column names, longer than 
30 chars. I suppose this is the problem you encounter. Check the length of your 
property name and consider the naming strategy you use?

For example, using org.hibernate.cfg.DefaultComponentSafeNamingStrategy and 
several levels of embedded properties, can easily interfere with this Oracle 
limitation when trying to generate names like 
customer_address_municipality_id:(

If this is not the case, it's not a bad idea to paste some code, logs...?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3943209#3943209

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3943209


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: DAO-JDBC vs. EJB3

2006-05-11 Thread atodorov
The explanations provided in 
   http://www.hibernate.org/15.html and 
   http://www.hibernate.org/157.html 
I find very comprehensive and substantial. 

The issues related to performance have always been very easy to be 
misunderstood and wrongly interpreted...

I just want to mention that using DAO  JDBC forces you to work on a lower 
level, which means that you are less likely to do unnecessary things. When 
using additional layer (even the best ORM) it is often much easier to do 
wrong things that slow down the performance (like unnecessary eager 
collections  objects). But it does not mean that the problem is in the ORM 
itself. As a matter of fact, I am not too proficient in hibernate, but I think 
that it is pretty good at what it does.

So, I'd almost always prefer hibernate3/EJB3 (with annotations) to JDBC/DAO, 
because I find that these technologies have more pros than cons. As a 
comparison, I'll mention that I'd almost never prefer EJB2 persistence to 
JDBC/DAO...



View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3942979#3942979

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3942979


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: EJB class in SAR not reloaded during redeploy

2006-05-09 Thread atodorov
Well, when I changed the setting of Isolated/CallByValue to false, it appears 
to work properly.

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3942137#3942137

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3942137


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - EJB class in SAR not reloaded during redeploy

2006-05-08 Thread atodorov
JBoss 4.0.4 CR 2, EJB3

An application with multiple .ear files, a common .jar and a .sar file.

The common.jar contains the component (local) interface of a SLSB. The SLSB 
impl is in one of the ears. Everything works fine, but the problem appears in 
the SAR file when the application is redeployed. It works fine in ALL of the 
ears, which are using this ejb (no matter how many times I redeploy)

So I found the following: when I deploy the first time after starting JBoss, 
all ejb clients (both sar and ears) retrieve the ejb object w/o a problem. But 
when I redeploy, the ejb object retrieved by the JNDI lookup in the SAR file is 
an instance of the same (the old, first loaded) EJB class. There is no problem 
when retrievig the EJB from any of the ears, because they receive an instance 
of a new (obviously reloaded) class, which is an instanceof the NEW local 
interface.

So I get a ClassCastException, because the EJB interface is reloaded and I am 
trying to cast the ejb impl which is still instanceof the OLD EJB Interface.

This is probably expected behaviour for a SAR, but it is making troubles in 
this case. Any ideas how to cope with this? Maybe I need to configure JBoss 
somehow..?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3941943#3941943

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3941943


---
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Cannot recognize polymorphic properties in a query

2006-03-15 Thread atodorov
I have a structure like this:

@Entity
  | public class User {
  | Person person;
  | //...
  | }
  | 
  | @Entity
  | @Inheritance(strategy = InheritanceType.JOINED)
  | public abstract class Person {...}
  | 
  | @Entity
  | public class Student extends Person {
  | SomeType someStudentProperty;
  | //...
  | }
  | 
  | @Entity
  | public class Teacher extends Person {...}

I want to query the users with testing the someStudentProperty in the where 
clause, but it doesn't work...
from User u where u.person.someStudentProperty = whatsoever...

(from User u where u.person.somePersonProperty = whatsoever... works 
correctly)

Is it a bug, I miss something, or it is not a supported feature?

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3930275#3930275

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3930275


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Re: Cannot recognize polymorphic properties in a query

2006-03-15 Thread atodorov
anonymous wrote : From my understanding of polymophism I wouldnt call this a 
polymorphic query

I did not say polymorphic query. I used the term polymorphic properties in a 
query. Anyway, it might be not the most proper way to call it. The question is 
about using properties declared in an inherited class of the ref type. 
Obviously the loaded person object will be of type Student or Teacher. What 
I'm interested in is how to query only the users having for person a student, 
that satisfies a certain condition...

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3930315#3930315

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3930315


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB 3.0] - Persisting enum fields with custom value mapping

2006-03-10 Thread atodorov
Let's say we have an enum with custom values, used as a persistent field in an 
entity:

public enum Sex {
  | 
  | MALE(77),
  | FEMALE(99);
  | 
  | public int getValue() {
  | return value;
  | }
  | 
  | int value;
  | 
  | Sex(int v) {
  | value = v;
  | }
  | }

The spec defines two ways to map the enum property with the DB field:

Sex.MALE = 0
  | Sex.FEMALE = 1
  |  // the default one, i.e. the var.ordinal() value
  | 
or

Sex.MALE = MALE
  | Sex.FEMALE = FEMALE
  | // using @Enumerated(STRING)
  | 
  | 
That's ok, but is there an easy way to use some kind of custom mapping? 

In this case:

Sex.MALE = 77
  | Sex.FEMALE = 99
  |  // i.e. the user-defined var.getValue() result
  | 


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3929351#3929351

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3929351


---
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: JBoss and user threads and sockets

2006-02-10 Thread atodorov
Ok, thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3922892#3922892

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3922892


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - JBoss and user threads and sockets

2006-02-09 Thread atodorov
We use the last version of JBoss with EJB3. 

We need to start a TCP/IP ServerSocket in our JBoss application, listening all 
the time the app is running. Is there a problem to do this in JBoss? Is it 
allowed, and is there a danger JBoss to decide to influence the thread(s) I 
start?

By the way, the EJB specification (for both 2 and 3) states that:

anonymous wrote : The enterprise bean must not attempt to manage threads. The 
enterprise bean must not attempt
  | to start, stop, suspend, or resume a thread; or to change a thread?s 
priority or name. The enterprise
  | bean must not attempt to manage thread groups.

Well, they say The enterprise bean must not attempt to manage threads. But 
does it mean that this restriction is not related to other classes deployed in 
the EJB container?


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3922499#3922499

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3922499


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: JBoss and user threads and sockets

2006-02-09 Thread atodorov
I see...

But what about if I use threads  sockets in the same VM, but outside of the 
ejb container? We use the bundled Tomcat. May I manage threads  sockets safely 
from a ServletContextListener (for examlpe)?


View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3922574#3922574

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3922574


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Installation, Configuration Deployment] - Updating hibernate manager?

2005-12-14 Thread atodorov
Hi there!

I use EJB3 with JBoss 4.0.3 SP1.

There are several bugs fixed in hibernate-entitymanager-3.1beta5. Can I update 
only this part of the JBoss version I've installed or I need to wait for the 
next JBoss version?

Thanks!

View the original post : 
http://www.jboss.com/index.html?module=bbop=viewtopicp=3912592#3912592

Reply to the post : 
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3912592


---
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user