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
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.
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
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
-
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
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
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
--
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
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
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
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.
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
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.
---
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
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
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
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
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
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
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.
---
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
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
+-
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
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
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
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
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
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
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?
"[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
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
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
32 matches
Mail list logo