[EJB 3.0] - Best way to share entity beans across applications?
by grundor
Hi there,
I have an application which was originally created with seamgen and has the following structure when deployed to JBossAS:
| lu-ear.ear
| lu.war
| lu-ejb.jar
| META-INF
|
Now I have created a second application which needs to share many of the entity beans that are located in lu-ejb.jar.
My first attempt was to create a similar structure. When deployed it looks like this:
| mylu-ear.ear
| mylu.war
| lu-ejb.jar
| META-INF
|
So both ear's are using a copy of the lu-ejb.jar.
What happens under this scenario is that whatever application I deploy last is the one that works. The other application gives ClassCastException errors whenever an entity bean is accessed.
Part of our desire to split our application into two separate apps is so that in future we have ability to run on different servers.
The main thing I would like to share across the applications is the Entity beans as app 2 will need to access app 1's database, in addition to using its own.
Clearly I am not approaching this correctly. What is the right way to set this up?
-Mark
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169365#4169365
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169365
17 years, 11 months
[JBoss Cache: Core Edition] - jbosscache/jgroups memory leak
by hgardner
Hello,
I am seeing a jgroups memory leak and am wondering if anyone can provide some guidance. Below is a partial jmap histogram dump showing the jgroups leak:
468679912 990299 byte[]
227054264 5100368 char[]
124964040 5206835 java.lang.String
93450888 3893787 java.util.LinkedList$Entry
78882192 3286758 java.util.HashMap$Entry
69918576 2913274 java.net.Inet4Address
69918048 2913252 org.jgroups.stack.IpAddress
42562520 1064063 java.util.HashMap
40117048 1065311 java.util.HashMap$Entry[]
38877520 971938 org.jgroups.Message
38862560 971564 org.jgroups.blocks.RequestCorrelator$Header
31101984 971937 org.jgroups.protocols.pbcast.NakAckHeader
23460792 977533 java.util.LinkedList
23382312 974263 java.util.concurrent.ConcurrentHashMap$HashEntry
23326608 971942 java.util.concurrent.locks.ReentrantReadWriteLock$NonfairSync
23326608 971942 java.util.concurrent.locks.ReentrantReadWriteLock
We are using JBoss-Cache version JBossCache-1.4.1.SP6 and jgroups version 2.6.2. Any suggestions on how to work around this?
Any help would be greatly appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169360#4169360
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169360
17 years, 11 months
[Beginners Corner] - Rmi Class Downloading problem for class generated at runtime
by esalagea
Hello, its been several days since I have this problem with jboss.
My Configuration: jboss AS 4.2.3 GA, on a fedora machine (tried with jdk1.5 and jdk 1.6)
This is the problem:
My application generates a class using javassist; this class is downloaded through RMI ClassLoading (when my application makes a remote call putting an object of this class in argument). In j2se I use my own class file server by setting the appropriate codebase and everything works fine.
When my application is deployed in JBoss (the application-side that generates the clss) my remote application cannot load this class anymore.
I note that, in the jboss version of my application, there are two ClassServers (one started by JBoss and one started by my application) and the codebase has two entries (one for jboss and one for my application). I also note that I can download my class with a firefox browser on the ClassServer started by my application.
Everything looks like JBoss uses its own codebase property when marshaling objects.
Thank you,
Emil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169352#4169352
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169352
17 years, 11 months