[JBoss-user] [EJB 3.0] - problem injecting java:/Mail resource

2006-03-13 Thread nholbrook
I'm not sure if I'm just doing something dumb or if there is a bug here. I am trying to inject the mail session into an ejb. The class is a stateless session bean using a local interface only. I'm using the following. @Resource(mappedName="java:/Mail") javax.mail.Session session; I've tried

[JBoss-user] [EJB 3.0] - Re: Generics in EJB 3.0 Result List?

2006-03-07 Thread nholbrook
Hey It works. How much do you trust the code of a guy who can't figure out how to post on a message board? lol Anyway, I set this up so we could have a class with standard persistence mechanisms that could be used with different persistent managers. I also like the templating mechanisms.

[JBoss-user] [EJB 3.0] - Re: Generics in EJB 3.0 Result List?

2006-03-07 Thread nholbrook
What a pain in the butt. If somebody can tell me how to post a greater than and less than sign on here, I will be glad to post some code. All my template references get removed. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928597#3928597 Reply to the

[JBoss-user] [EJB 3.0] - Re: Generics in EJB 3.0 Result List?

2006-03-07 Thread nholbrook
My findAll uses the template, too but for some reason it was stripped on the post. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928596#3928596 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928596 -

[JBoss-user] [EJB 3.0] - Re: Generics in EJB 3.0 Result List?

2006-03-07 Thread nholbrook
Why not write your own persistence class that uses a persistence manager? public interface PersistenceManager { EntityManager getEntityManager(); void insert( T entity ); void remove( T entity ); T update( T entity ); T findById( Class entity, Serial

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-03-06 Thread nholbrook
Well, I did some digging around and came up with an interim solution that seems to work pretty well. I have multiple databases so I picked my common module to manage autogenerated id's for compount primary keys. The first is the entity object I generated in the database. The second is the IDG

[JBoss-user] [EJB 3.0] - Re: EmbeddedId and GeneratedValue

2006-03-03 Thread nholbrook
Done. Thanks. http://opensource2.atlassian.com/projects/hibernate/browse/ANN-268 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927896#3927896 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927896 --

[JBoss-user] [EJB 3.0] - Re: When to use EAGER / LAZY

2006-03-03 Thread nholbrook
Either that or make your fetch type eager. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3927878#3927878 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3927878 --- Th

[JBoss-user] [EJB 3.0] - Re: When to use EAGER / LAZY

2006-03-03 Thread nholbrook
The session is opened and closed inside the stateless bean method. Once the folder object is passed back across the wire, it is no longer connected to the session / datasource and cannot retrieve the files. You might consider writing a getFiles method in your stateless bean and call that inste

[JBoss-user] [EJB 3.0] - EmbeddedId and GeneratedValue

2006-03-03 Thread nholbrook
I have a composite key with 2 fields. 1 field is an auto-incrementing field, the other is a foreign key. I've been trying to put @GeneratedValue annotation on the auto-incrementing field, but can't seem to get it to work properly. Is this supported? I assumed thats why it was broken out of t

[JBoss-user] [EJB 3.0] - hibernate3 jars don't match

2006-02-24 Thread nholbrook
I just downloaded jboss 4.0.4RC1 to see how its going. I did a search for hibernate3.jar because I load them into my local maven repository. Anyway, I found hibernate3.jar files and they aren't the same. Here are the md5 hashes. 42e4664e91c4ce0dbfe8a59fe64d200c server/default/lib/hibernate3.

[JBoss-user] [EJB 3.0] - Re: SLSB Facade in front of Entity?

2006-02-22 Thread nholbrook
Well, I think a proxy is pretty simple. I don't write them for every entity and don't see a need for it. Here's my simple interface. public interface ServiceProxy { void insert( Serializable transientInstance ); void remove( Serializable persistentInstance ); T update

[JBoss-user] [EJB 3.0] - Re: Cascade Delete on 3 Entities not working

2006-02-15 Thread nholbrook
I've got a similar issue. For some odd reason, if I use a detached object and pass it back to the server to delete the object, it works fine. If I just pass the id of the object and have the server do a lookup then remove on the object, I get the same errors you are describing. ---

[JBoss-user] [EJB 3.0] - Re: Hibernate assigning wrong value to property?

2006-02-08 Thread nholbrook
I just went back to a single primary key id for company and everything works great again. I have no idea why this is working this way, but if I figure it out, I'll try to post here. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922402#3922402 Reply to the

[JBoss-user] [Persistence,JBoss/CMP, Hibernate, Database] - Problem with hibernate mapping wrong column to property?

2006-02-08 Thread nholbrook
Sorry. I hate to cross-post but I posted this question to the EJB3.0 forum and I'm not so sure it doesn't belong here. Thanks http://www.jboss.com/index.html?module=bb&op=viewtopic&t=77021 View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3922391#3922391 Repl

[JBoss-user] [EJB 3.0] - Re: Hibernate assigning wrong value to property?

2006-02-08 Thread nholbrook
Sorry, forgot to post the CompanyId class. By the way, this was all generated with the jbosside 1.5 hibernate tools. /** * SecCompanyId generated by hbm2java */ @Embeddable public class SecCompanyId implements java.io.Serializable { // Fields private Int

[JBoss-user] [EJB 3.0] - Hibernate assigning wrong value to property?

2006-02-08 Thread nholbrook
I made the primary key of SecCompany a composite key and now I am unable to do anything with the SecUser class which has a reference to it as a foreign key. I can't insert, find, etc. I have included both classes, hibernate debug, stack trace, etc. It seems to be trying to set the type_id to the

[JBoss-user] [EJB 3.0] - Re: Examples

2006-02-02 Thread nholbrook
Thanks for the help. I'll start playing around. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921361#3921361 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921361

[JBoss-user] [EJB 3.0] - Examples

2006-02-02 Thread nholbrook
Is there an example with separate war accessing ear or ear accessing ear anywhere? I'm still getting class cast exceptions when I do the lookup and cast to the remote interface. Here's the setup. war -- somedomain.jar some ear -- somedomain.jar -- someservices.jar other ear -- somedomain

[JBoss-user] [EJB 3.0] - Re: entity manager not working on RC4

2006-02-02 Thread nholbrook
Ive got the same thing happening. Here's my stack trace. I'm running JBOSS4.0.4 from cvs. I had to use the thirdparty hibernate libs from jboss-head to get it to build because there were changes to the ejb3 module files that wouldn't compile. ---

[JBoss-user] [EJB 3.0] - Re: EntityManager won't deploy with new EJB3.0RC4

2006-02-02 Thread nholbrook
I thought I had. I'll try a fresh install. Any idea when 4.0.4 will be available? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3921217#3921217 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3921217

[JBoss-user] [EJB 3.0] - EntityManager won't deploy with new EJB3.0RC4

2006-02-01 Thread nholbrook
Here's my persistence.xml and messages. If you look at the messages, the object name looks mighty strange with .ear.ear. I can't seem to find the schema for this new persistence.xml so if anybody has any ideas as to whether this should work, I'd appreciate it. Thanks Nic java: Namespace +-

[JBoss-user] [EJB 3.0] - Re: EntityManager won't deploy with new EJB3.0RC4

2006-02-01 Thread nholbrook
It deploys alright if I go with the configuration below. Is this the old way or the new way? I'm probably just confused. Thanks Nic SecurityEntityManager java:/SecurityDS View the origin

[JBoss-user] [EJB 3.0] - Cannot get embedded jboss Alpha4 to boot

2006-02-01 Thread nholbrook
I get this error each time I try to run a junit test. My code is based on the example code. Any ideas on how to get this going? Thanks in advance Nic -- java.lang.RuntimeExcept

[JBoss-user] [EJB 3.0] - Re: Cannot get the embedded ejb source code with CVS

2006-01-31 Thread nholbrook
I'm getting errors, too. I would like to build this so I can do some testing of what may be bugs in the current 4.0.3 version. Hopefully, they're fixed and I can move on. Here's the output from my build. Thanks Nic

[JBoss-user] [JBoss Eclipse IDE (users)] - Re: JNDI-problem with Tutorial

2005-12-27 Thread nholbrook
I changed the Isolated property to false inside the ear-deployer.xml. I also needed to modify the classloader options in the file jbossweb-tomcat55.sar/META-INF/jboss-service.xml. There is a flag UseJBossWebLoader and Java2ClassLoadingCompliance that I believe affect classloading. I changed

[JBoss-user] [Tomcat, HTTPD, Servlets & JSP] - JNDI Datasource

2005-12-19 Thread nholbrook
I have a datasource defined in JBOSS called SecurityDS. When I define a DataSourceRealm inside Tomcat for authentication, it doesn't seem to be able to find it. I have tried to access it both as dataSourceName="SecurityDS" and dataSourceName="java:SecurityDS" I seem to get a NullPointerExc

[JBoss-user] [JBoss Eclipse IDE (users)] - Re: JNDI-problem with Tutorial

2005-12-19 Thread nholbrook
How do we get away from the ClassCastException when the war isn't packaged inside the ear? Anybody have any insight here yet? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3913416#3913416 Reply to the post : http://www.jboss.com/index.html?module=bb&op=post

[JBoss-user] [EJB 3.0] - Re: ClassCastException/Entity Bean Remoting

2005-12-14 Thread nholbrook
For more information, if I have a par, ejb3, and war in the same ear, I can't even include the par in the WEB-INF/lib of the war or I get ClassCastExceptoins. I need to be able to give the par to other web app developers as a jar for access to our entity objects. Is anybody looking into this?

[JBoss-user] [EJB 3.0] - Re: ClassCastException/Entity Bean Remoting

2005-12-14 Thread nholbrook
"[EMAIL PROTECTED]" wrote : | | WARs have a scoped classloader by default (required by spec). You can turn this off to use the unified, flat classloader scheme and this should fix the problem on JBoss. | | How do I turn this off? I have the exact same problem. View the original po

[JBoss-user] [EJB 3.0] - ClassCastException casting entity beans

2005-12-14 Thread nholbrook
I am running jboss4.0.3sp1 on linux with jdk1.5.0_05. I have a webapp that use stateless beans to access a database through entity beans. As long as I access the entity beans inside the stateless beans, I can cast and use them as the class type they are. Once they are passed back to the webap

[JBoss-user] [EJB 3.0] - Re: EAR deployment with custom datasource

2005-12-07 Thread nholbrook
Any word on the progress with this bug? I have the same issue where I have a .ejb3 and a .par inside a .ear. There are some classes in the .ejb3 that have dependencies on the entity manager created by the .par. The ejb3 is always deployed first no matter how I declare it in the application.x