[JBoss-user] [EJB/JBoss] - Lock contention during test

2005-05-03 Thread fburlet
Hi,

I'm getting a lock contention during the launch of a junitee test of my 
application. This lock contention is coming out when I call the remove method 
on a entity bean.

My test is quite simple, create needed entities in the setUp() method. Call an 
entry point of the application by providing some data. Let the application run 
and remove all the created entities in the tearDown() method.

When I simulate the flow with a bean shell, everything works fine. I tried to 
run the test by moving the deletion of created entities (the ones that create 
this lock contection) in the test itself: not much. I tried to remove the 
entities in different way: by getting a Collection and iterate over the 
Collection, by getting a single entry, ...): same.

I investigated more by tracing org.jboss.tm and org.jboss.ejb.BeanLock... but 
this is throwing a lot of unreadable (at least for me) logs. If you need these 
complete logs (more than 12000 lines), let me know.

Is there any way to detect exactly what is causing this lock contention ? Which 
transactions are active or whatever that could be interesting to know what is 
going wrong ?

I'm running jboss 3.2.4 with java  1.4.2_05-b04 under fedora core 3.


  | 15:15:35,001 DEBUG [http-0.0.0.0-8880-Processor25] 
[kservertest.base.OpmEntityCleaner] Remove 
logtrackandtrace:KIALAB0001.2005-05-03 15:14:58.932
  | 15:20:35,023 WARN  [Timeouts(1)-1] [jboss.tm.TransactionImpl] Transaction 
TransactionImpl:XidImpl [FormatId=257, GlobalId=eddie.dev.kiala.com//237, 
BranchQual=] timed out. status=STATUS_ACTIVE
  | 15:20:35,025 ERROR [http-0.0.0.0-8880-Processor25] [jboss.ejb.BeanLock] 
Thread[http-0.0.0.0-8880-Processor25,5,jboss]Saw rolled back 
tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=eddie.dev.kiala.com//237, B
  | ranchQual=] waiting for txLock
  | 15:20:35,030 WARN  [http-0.0.0.0-8880-Processor25] 
[jboss.tm.TransactionImpl] Lock contention, tx=TransactionImpl:XidImpl 
[FormatId=257, GlobalId=eddie.dev.kiala.com//237, BranchQual=]
  | 15:20:35,039 ERROR [http-0.0.0.0-8880-Processor25] 
[ejb.plugins.LogInterceptor] RuntimeException:
  | java.lang.RuntimeException: Transaction marked for rollback, possibly a 
timeout
  | at 
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.waitForTx(QueuedPessimisticEJBLock.java:366)
  | at 
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.doSchedule(QueuedPessimisticEJBLock.java:236)
  | at 
org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock.schedule(QueuedPessimisticEJBLock.java:183)
  | at 
org.jboss.ejb.plugins.EntityLockInterceptor.invoke(EntityLockInterceptor.java:85)
  | at 
org.jboss.ejb.plugins.EntityCreationInterceptor.invoke(EntityCreationInterceptor.java:54)
  | at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
  | at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
  | at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
  | at 
org.jboss.ejb.EntityContainer.internalInvoke(EntityContainer.java:484)
  | at org.jboss.ejb.Container.invoke(Container.java:723)
  | at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:359)
  | at 
org.jboss.ejb.plugins.local.EntityProxy.invoke(EntityProxy.java:44)
  | at $Proxy787.remove(Unknown Source)
  | at 
com.kiala.kservertest.base.OpmEntityCleaner.removeLogtrackandtraceByPrimaryKey(OpmEntityCleaner.java:210)
  | at 
com.kiala.kservertest.synch.KialaItemScanningTest.testItem01_02_ItemScanningFeedbackOnlyDelivery(KialaItemScanningTest.java:129)
  | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:324)
  | at junit.framework.TestCase.runTest(TestCase.java:154)
  | at junit.framework.TestCase.runBare(TestCase.java:127)
  | at junit.framework.TestResult$1.protect(TestResult.java:106)
  | at junit.framework.TestResult.runProtected(TestResult.java:124)
  | at junit.framework.TestResult.run(TestResult.java:109)
  | at junit.framework.TestCase.run(TestCase.java:118)
  | at org.junitee.runner.TestRunner.run(TestRunner.java:108)
  | at 
org.junitee.servlet.JUnitEEServlet.runTests(JUnitEEServlet.java:233)
  | at org.junitee.servlet.JUnitEEServlet.doGet(JUnitEEServlet.java:202)
  | at 

[JBoss-user] [EJB/JBoss] - Re: jboss4, EJB local interfaces, and multiple isolated EARs

2005-05-03 Thread fburlet

You should have a look at 
 http://wiki.jboss.org/wiki/Wiki.jsp?page=HotDeployClassCastExceptions
and this also could help
 http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration




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

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


---
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [Messaging, JMS JBossMQ] - JMSExpiration

2005-02-14 Thread fburlet
Hi,

I modified a bit the JMSSenderBean from the doc to support JMSExpiration. I 
just added an extra argument which is the value of the time to live and do 
before sending the message: msg.setJMSExpiration(timeToLive);.

I made a simple test case which creates a queue, posts a message with a 
timeToLive of 5 seconds, makes the thread sleep and gets the message from the 
queue. When I check the content of the queue through the JMX Console after the 
message being posted, I see that the JMSExpiration properties of the message is 
set to 0 whereas I set it to 5 sec !?

I'm using jboss 3.2.4 with j2sdk 1.4.2_05.

What could be wrong ?

Code for the test


  | // Create a queue
  | JmsSenderLocal sender = JmsSenderUtil.getLocalHome().create();
  | Queue queue = 
JmsQueueManagerUtil.getLocalHome().create().getQueue(dummyQueue_0);
  | 
  | // Post a message
  | sender.send(new TextMessageCreator(dummyMessage_0), queue, null, 
5000);
  | 
  | // Sleep for at least 10 seconds
  | sleep(10);
  | 
  | // Get the message from the queue
  | JmsReceiverLocal receiver = JmsReceiverUtil.getLocalHome().create();
  | assertNull(receiver.receive(queue));
  | 

Sleep is a method calling thread.sleep()

The modified send method


  | public void send(MessageCreator messageCreator, Queue queue, Date 
deliveryDate, long timeToLive) throws JMSException {
  | if (logger.isDebugEnabled()) {
  | logger.debug(Sending message [ + messageCreator + ] to queue 
[ + queue.getQueueName() + ]);
  | }
  | 
  | QueueConnection connection = null;
  | QueueSession session = null;
  | QueueSender sender = null;
  | 
  | try {
  | connection = openQueueConnection();
  | session = connection.createQueueSession(false, 
QueueSession.AUTO_ACKNOWLEDGE);
  | sender = session.createSender(queue);
  | Message msg = messageCreator.getMessage(session);
  | 
  | if (deliveryDate != null) {
  | logger.debug(Message will be delivered on 
[+deliveryDate+]);
  | msg.setLongProperty(JMS_JBOSS_SCHEDULED_DELIVERY, 
deliveryDate.getTime());
  | }
  | 
  | if (timeToLive = 0) {
  | msg.setJMSExpiration(System.currentTimeMillis() + 
timeToLive);
  | }
  | sender.send(msg);
  | } finally {
  | closeQueueSender(sender);
  | closeSession(session);
  | closeConnection(connection);
  | }
  | }
  | 

The message


  | SpyTextMessage {
  | Header { 
  |jmsDestination  : QUEUE.dummyQueue_0
  |jmsDeliveryMode : 2
  |jmsExpiration   : 0
  |jmsPriority : 4
  |jmsMessageID: ID:8-11083781808063
  |jmsTimeStamp: 1108378180806
  |jmsCorrelationID: null
  |jmsReplyTo  : null
  |jmsType : null
  |jmsRedelivered  : false
  |jmsProperties   : {}
  |jmsPropReadWrite: true
  |msgReadOnly : false
  |producerClientId: ID:8
  | }
  | Body {
  |text:dummyMessage_0
  | }
  | }
  | 

If you need the log in trace mode just tell me and I will post it.

Regards,

Fred.

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

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


---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - SocketException: Connection reset

2005-01-31 Thread fburlet
Hi,

We are running jboss 3.2.4 in production for a while now. Everything was fine 
till we got the following exception two days ago (see below). We don't manage 
to find out why we get this error message. It looks like as if the naming 
service is down, we checked its state through the jmx console but it was on 
started.

We are running jboss 3.2.4 with java sun jdk 1.4.2_05 on redhat linux AS 3.0.


  | 04:55:50,962 ERROR [synch.driver.ScannerSynchSessionBean] [801013G40268-K / 
090719] Failed to mark ScannerConnection as succesful.
  | javax.naming.CommunicationException [Root exception is 
java.rmi.ConnectIOException: error during JRMP connection establishment; nested 
exception is: 
  | java.net.SocketException: Connection reset]
  | at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:647)
  | at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
  | at javax.naming.InitialContext.lookup(InitialContext.java:347)
  | at 
com.kiala.kserver.synch.driver.helper.ScannerConnectionLoggerUtil.lookupHome(ScannerConnectionLoggerUtil.java:16)
  | at 
com.kiala.kserver.synch.driver.helper.ScannerConnectionLoggerUtil.getLocalHome(ScannerConnectionLoggerUtil.java:54)
  | at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.getScannerConnectionLoggerHome(ScannerSynchSessionBean.java:715)
  | at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.commitSynchAndLogSuccess(ScannerSynchSessionBean.java:435)
  | at sun.reflect.GeneratedMethodAccessor306.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:324)
  | at 
org.jboss.ejb.StatefulSessionContainer$ContainerInterceptor.invoke(StatefulSessionContainer.java:949)
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
  | at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
  | at 
org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessionInstanceInterceptor.java:273)
  | at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
  | at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
  | at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
  | at 
org.jboss.ejb.StatefulSessionContainer.internalInvoke(StatefulSessionContainer.java:416)
  | at org.jboss.ejb.Container.invoke(Container.java:723)
  | at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:359)
  | at 
org.jboss.ejb.plugins.local.StatefulSessionProxy.invoke(StatefulSessionProxy.java:41)
  | at $Proxy858.commitSynchAndLogSuccess(Unknown Source)
  | at 
com.kiala.kserver.synch.driver.SyncherSessionBean.logout(SyncherSessionBean.java:405)
  | at sun.reflect.GeneratedMethodAccessor304.invoke(Unknown Source)
  | at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  | at java.lang.reflect.Method.invoke(Method.java:324)
  | at 
org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)
  | at 
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
  | at 
org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:72)
  | at 
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:315)
  | at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:148)
  | at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
  | at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
  | at 
org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
  | at 
org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:331)
  | at org.jboss.ejb.Container.invoke(Container.java:723)
  | at 
org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:359)
  | at 
org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:83)
  | at $Proxy868.logout(Unknown Source)
  | at sun.reflect.GeneratedMethodAccessor303.invoke(Unknown Source)
  | at 

[JBoss-user] [EJB/JBoss] - Displayed message during ApplicationDeadlockException

2005-01-26 Thread fburlet
Hi,

I'm trying to understand what could mean the displayed message when an 
ApplicationDeadLockException occurs. You will find here above an extract that I 
tried to parse. 


  | * [EMAIL PROTECTED],
  |bean=ParcelGuid, 
  |id=ae3ee5b4c0a8062000d60cddf191dbad,
  |refs=4,
  |tx=TransactionImpl:XidImpl [FormatId=257, 
GlobalId=eddie.dev.kiala.com//239, BranchQual=],
  |[EMAIL PROTECTED] Thread Pool Worker-9,5,ASF Session Pool 
Threads],
  |timeout=5000, 
  |queue=[TXLOCK waitingTx=TransactionImpl:XidImpl 
  |  [FormatId=257, GlobalId=eddie.dev.kiala.com//248, 
BranchQual=]
  |   id=0 
  |   [EMAIL PROTECTED] Thread Pool Worker-7,5,ASF Session Pool 
Threads] 
  |   queued=true], 
  | * holder=TransactionImpl:XidImpl [FormatId=257, 
GlobalId=eddie.dev.kiala.com//255, BranchQual=], 
  | * [EMAIL PROTECTED], 
  |bean=ParcelHistory, 
  |id=tnt_id_2, 
  |refs=2, 
  |tx=TransactionImpl:XidImpl [FormatId=257, 
GlobalId=eddie.dev.kiala.com//255, BranchQual=],
  |synched=null,
  |timeout=5000,
  |queue=[TXLOCK waitingTx=TransactionImpl:XidImpl
  |  [FormatId=257, GlobalId=eddie.dev.kiala.com//239, 
BranchQual=]
  |  id=0 
  |  [EMAIL PROTECTED] Thread Pool Worker-1,5,ASF Session Pool 
Threads] 
  |  queued=true],
  | * waitingResourceHolder=TransactionImpl:XidImpl [FormatId=257, 
GlobalId=eddie.dev.kiala.com//255, BranchQual=]
  | 

My feelings tells me that transactions 239 and 255 are in conflict but I don't 
manage to get a good understanding from the message.

Any help will be appreciated.

Fred.

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

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


---
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag--drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
___
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - ejbPassivate() and private transient fields

2004-09-21 Thread fburlet
Hi,

I have a stateful session bean that has a private transient field which is the 
LocalHome interface of another session Bean (a stateless one).

I instanciate a proxy by invoking a private method from within the stateful session 
bean as in the following extract:


  | private transient MySessionBeanLocalHome privateField;
  | ...
  | private MySessionBeanLocalHome getMySessionBeanLocalHome() {
  |if (privateField == null) {
  |   privateField = MySessionBeanUtil.getLocalHome();
  |}
  |return privateField;
  | }
  | 

In the ejbPassivate() method of the stateful session bean, I call the 
getMySessionBeanLocalHome() private method and I get a ClassCastException when the 
session bean passivate (here below the stacktrace I get).

I don't understand what happens. Any idea ?

The stacktrace:

  | 12:26:10,922 ERROR [synch.driver.ScannerSynchSessionBean] [801018530188-K / 
32000110] Could not passivate
  | java.lang.ClassCastException
  | at 
com.kiala.kserver.synch.driver.helper.ScannerConnectionLoggerUtil.getLocalHome(ScannerConnectionLoggerUtil.java:54)
  | at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.getScannerConnectionLoggerHome(ScannerSynchSessionBean.java:698)
  | at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.rollbackSynchAndLogFailure(ScannerSynchSessionBean.java:464)
  | at 
com.kiala.kserver.synch.driver.ScannerSynchSessionBean.ejbPassivate(ScannerSynchSessionBean.java:671)
  | at 
com.kiala.kserver.synch.driver.ScannerSynchSession.ejbPassivate(ScannerSynchSession.java:20)
  | at 
org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager.passivateSession(StatefulSessionFilePersistenceManager.java:371)
  | at 
org.jboss.ejb.plugins.StatefulSessionInstanceCache.passivate(StatefulSessionInstanceCache.java:85)
  | at 
org.jboss.ejb.plugins.AbstractInstanceCache.tryToPassivate(AbstractInstanceCache.java:151)
  | at 
org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy$OveragerTask.run(LRUEnterpriseContextCachePolicy.java:447)
  | at 
org.jboss.ejb.plugins.LRUStatefulContextCachePolicy$RemoverTask.run(LRUStatefulContextCachePolicy.java:143)
  | at java.util.TimerThread.mainLoop(Timer.java:432)
  | at java.util.TimerThread.run(Timer.java:382) 
  | 

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

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


---
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - ClassCastException at runtime

2004-05-12 Thread fburlet
Hi,

I encounter some problems when running my app. I got a ClassCastException at runtime.

I made 2 ear: one is the client of the other. I put the interfaces in the both ears. I 
defined for the both a loader repository (through jboss-app.xml).


  |loader-repository
  |   kiala:entities=LoaderRepository
  |   loader-repository-config
  |  java2ParentDelegation=false
  |   /loader-repository-config
  |/loader-repository
  | 

I'm allowed to cold/hot (re)deploy the application but at runtime, I got a 
ClassCastException.

I would like to be able to cold/hot (re)deploy my modules independent from each other 
and run the application as well. (And even later, to deploy these modules on separate 
machines).

Any help would be appreciate,

Fred.



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

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


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: ClassCastException at runtime

2004-05-12 Thread fburlet

Ok, thank you for your help.

Yes, it might be a good idea to post your explanation on the wiki.

Fred.



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

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


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Classloading problem

2004-05-07 Thread fburlet
Hi,

I have 3 ears that define modules A, B, C. These modules are dependent in the sense 
that for example, module B is using interfaces from module A to get compiled (and even 
deployed without having A being deployed).
I would like to deploy/redeploy these modules at any time. So, to achieve my goal, I 
separated interfaces from bean in each module and put the interfaces to solve the 
dependency issues.

So schematically, the 3 ears looks like:

A :
 A.jar // only beans
 lib/A-client.jar // only interfaces from A
 META-INF - application.xml 
  // defines lib/A-client.jar as java module
  // defines A.jar as ejb module

in A.jar, the ejb-jar.xml file contains the tag 
ejb-client-jarlib/A-client.jar/ejb-client-jar and the Class-Path from its 
MANIFEST.MF contains lib/A-client.jar

B: //depends on A and C
 B.jar // an ejb module
 lib/A-client.jar // only interfaces from A
 lib/another-jar.jar // containing no beans
 lib/C-client.jar // only interfaces from C
 META-INF - application.xml

In B.jar, the ejb-jar.xml file contains tags ejb-client-jar that list all the jar 
from the lib dir, and the Class-Path from its MANIFEST.MF contains these libs.

C : // depends on A
 C.jar // only beans
 lib/C-client.jar // only interfaces from C
 lib/another-jar.jar // same that the one from B
 lib/A-client.jar // only interfaces from A
 META-INF - application.xml

In C.jar, the deployment descriptor contains tags ejb-client-jar that list all the 
jars from the lib dir and the Class-Path entry from its MANIFEST.MF also contains 
these libs.
 
All modules deploy correctly and the application runs correctly until I redeploy the 
modules... Once they are redeployed I got an IllegalAccessError on some beans (in fact 
it seems that each inner class are hitten by this error, I don't know for sure that 
there is a relation).
After having a look at the documentation, it seems that the error occurs because the 
same classe is loaded in different class loaders. I saw that to be able to use the 
same classe in different ear, we have to define tag loader-repository in the 
jboss-app.xml (near the application.xml). That what I did for each module: adding


  | loader-repository
  |  kiala:core=LoaderRepository
  |  loader-repository-config
  | java2ParentDelegation=false
  |  /loader-repository-config
  | /loader-repository
  | 

The application deploys very well, but I got a ClassCastException at runtime...

Any help would be welcome.

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

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


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [EJB/JBoss] - Re: dependancy of modules and hot (re)deployment

2004-05-07 Thread fburlet
I finally find out a solution for my problem:

I did the following:

EAR contains 
 A.jar // jar containing beans, 
 lib/A-client.jar // jar containing interfaces only
 META-INF/application.xml
 // containing references to A.jar as ejb module, lib/A-client.jar as java module

The deployment description of A.jar (ejb-jar.xml) must contain a tag ejb-client-jar 
referencing the client jar and this jar must be specified in the Class-Path entry of 
the MANIFEST.MF.

The client jar might be used in other ear files by doing the same trick.

The ear file is redeployable.


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

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


---
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson  Lucent use to 
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user