Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing

2001-07-12 Thread Nick Betteridge

The LDAP provider is defined in the 

The ejb-jar.xml file is :


   
   
 
   ClientEJBdmin
   com.syntactics.server.admin.ejb.ClientHome
   com.syntactics.server.admin.ejb.Client
   com.syntactics.server.admin.ejb.ClientEJB
   Stateful
   Container
   
 
   ClientEJB
 
 
   com.sun.jndi.ldap.LdapCtxFactory
 
   
 

   
 

and the jboss.xml file is 

   
   
 
   ClientEJB
   ldap://ds.syntactics.com:389/o=application
 
   
 




[AutoDeployer] org.jboss.deployment.J2eeDeploymentException: Error while
startin
g admin-ejb.jar: Could not deploy
file:/export/home/nick/servers/jboss/JBoss-2.4
.0BETA/tmp/deploy/Default/admin-ejb.jar, Cause:
org.jboss.ejb.DeploymentExceptio
n: Could not deploy
file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/dep
loy/Default/admin-ejb.jar, Cause:javax.naming.NamingException [Root
exception is
 java.net.MalformedURLException: Not an LDAP URL: ldap:]
[AutoDeployer]  at
org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.j
ava:511)
[AutoDeployer]  at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeploy
er.java:464)
[AutoDeployer]  at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:20
8)
[AutoDeployer]  at java.lang.reflect.Method.invoke(Native Method)
[AutoDeployer]  at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1628)
[AutoDeployer]  at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl
.java:1523)
[AutoDeployer]  at
org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
[AutoDeployer]  at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
[AutoDeployer]  at java.lang.Thread.run(Thread.java:484)


Scott M Stark wrote:
> 
> The first looks like a bug in the JMX management stuff trying to use
> a JNDI name as a JMX ObjectName. This won't work in general. ObjectNames
> have a restricted syntax, JNDI names do not.
> 
> I can't see enough of the second case stack trace to know what the problem
> is.
> What have you done to supply a JNDI ldap provider?
> 
> - Original Message -
> From: "Nick Betteridge" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 11, 2001 11:44 PM
> Subject: [JBoss-dev] jboss + jndi + ldap for ejb referencing
> 
> > Is this a bug?
> >
> > I'm trying to set up my ejb referencing in jboss to use ldap.
> >
> > When I set ejb-jar.xml to ...
> >
> > 
> >
> >  
> >ClientEJBdmin
> >com.syntactics.server.admin.ejb.ClientHome
> >com.syntactics.server.admin.ejb.Client
> >com.syntactics.server.admin.ejb.ClientEJB
> >Stateful
> >Container
> >
> >  
> >ClientEJB
> >  
> >  
> >com.sun.jndi.ldap.LdapCtxFactory
> >  
> >
> >  
> >
> >  
> >
> >
> > and jboss.xml to ...
> >
> > 
> >
> >  
> >ClientEJB
> >ds.syntactics.com:389/o=application
> >  
> >
> >  
> >
> > ... I get
> >
> > [Container factory] End java:comp/env for EJB: ClientEJB
> > [Container factory] JRMP 1.3 CI initialized
> > [Container factory] Storing sessions for ClientEJB
> > in:/export/home/nick/servers/
> > jboss/JBoss-2.4.0BETA/db/sessions/ClientEJB
> > [Container factory] 0 old sessions removed
> > [Container factory] Bound ClientEJB to
> > ds.syntactics.com:389/o=application
> > [Default] javax.management.MalformedObjectNameException: ObjectName:
> > Invalid val
> > ue -> ds.syntactics.com:389/o=application
> >
> >
> > If I correctly set the jndi-name to
> > ldap://ds.syntactics.com:389/o=application  then I get another
> > deployment failure of ...
> >
> > [AutoDeployer] org.jboss.deployment.J2eeDeploymentException: Error
> > while
> > startin
> > g admin-ejb.jar: Could not deploy
> > file:/export/home/nick/servers/jboss/JBoss-2.4
> > .0BETA/tmp/deploy/Default/admin-ejb.jar, Cause:
> > org.jboss.ejb.DeploymentExceptio
> > n: Could not deploy
> > file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/dep
> > loy/Default/admin-ejb.jar, Cause:javax.naming.NamingException [Root
> > exception is
> >  java.net.MalformedURLException: Not an LDAP URL: ldap:]
> >
> >
> > Any ideas?
> >
> > Thanks and regards
> >
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> >
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] Announcement: Documentation update and latest progress

2001-07-12 Thread Tobias Frech

Hi!
Here are the latest news about the updates in the documentation section
of JBoss:

- Visual Age for Java integration:
Craig Doremus just provided us with an updated version of the VAJ
integration guide. Check it out and update your IDE to JBoss 2.2.2 and
VAJ 3.5p2.

- Ongoing "JBoss 2.2.2 manual compliance effort": 
We already have 50 percent covered to be checked for JBoss 2.2.2
compliance  by numerous volunteers. Perhaps you could help us to get the
other 50 percent covered ? We are especially looking for people using
the following databases:
* DB2 
* Sybase
* Interbase
* mySQL
* MS Access

Also we need people that looked through or are going to work through
the following chapters of the manual:
* 02   Configuration
* 03   JDBC (general part)
* 08   Container architecture - design notes
* 10   JBoss in production
* HT01 Tomcat and JBoss
* HT02 Using JBoss-Jetty
* HT04 Examples Richard Monson-Haefel
* HT06 JMX Connector Description
* HT08 Deployment on JBoss
* HT11 Integrating JBuilder 4.0
* HT12 Visual Age for Java integration
* HT13 Integrating NetBeans/Forte
* HT15 JBossCX
* HT20 Pet Store 1.1.1

If you would like to help us just join the jboss-docs mailing list and
get further directions there.

- Usage of jboss-web.xml:
Scott Stark added a section about the usage of jboss-web.xml to the
"Advanced container configuration" chapter. Not only does it contain
explanations for internal and external references but also there are a
lot of sample descriptors included.

- Manual search function: 
Most of you will have seen it already. For all others I'd like to
mention that there is search function for the manual now. Just go to
the documentation section on www.jboss.org and enter your keywords.

- Source code examples in the manual:
We now have a great (ant based) build system for the examples contained
in the manual. Making your first steps in a new topic is now as easy as
invoking a script and simply deploying the result archive.

- Various:
There were various bug fixes, clarifications (e.g. for CMP2.0 and
JBoss2.4 features) made to the documentation area. Check out the
documentation to see which changes I missed to mention.

Come, join the writing guild, join jboss-docs.

Cheers,
Tobias

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing

2001-07-12 Thread Scott M Stark

No, where are the ldap provider jars on the classpath? A resource-env-ref is
just an alias to an existing binding in JNDI that has been created by
an adimistrator. It causes nothing to be created other than an alias from
the bean ENC to the existing binding.

- Original Message - 
From: "Nick Betteridge" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 1:04 AM
Subject: Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing


> The LDAP provider is defined in the 
> 
> The ejb-jar.xml file is :
> 
> 
>
>
>  
>ClientEJBdmin
>com.syntactics.server.admin.ejb.ClientHome
>com.syntactics.server.admin.ejb.Client
>com.syntactics.server.admin.ejb.ClientEJB
>Stateful
>Container
>
>  
>ClientEJB
>  
>  
>com.sun.jndi.ldap.LdapCtxFactory
>  
>
>  
> 
>
>  
> 



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing

2001-07-12 Thread Nick Betteridge

I assumed that the ldap jars were part of java1.3. Still, I put the two
ldap jars (ldap.jar and ldapbp.jar) into the lib/ext directory.

This gave the following trace:

[AutoDeployer] Auto deploy of
file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/deploy/admin-ejb.jar
[J2EE Deployer Default] Deploy J2EE application:
file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/deploy/admin-ejb.jar
[J2EE Deployer Default] Create application admin-ejb.jar
[J2EE Deployer Default] install module admin-ejb.jar
[Container factory]
Deploying:file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/deploy/Default/admin-ejb.jar
[Verifier] Verifying
file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/deploy/Default/admin-ejb.jar/ejb1004.jar
[Container factory] Deploying ClientEJB
[Container factory] javax.naming.NamingException.  Root exception is
java.net.MalformedURLException: Not an LDAP URL: ldap:
[Container factory] at
com.sun.jndi.ldap.LdapURL.parse(LdapURL.java:89)
[Container factory] at
com.sun.jndi.ldap.LdapURL.(LdapURL.java:73)
[Container factory] at
com.sun.jndi.url.ldap.ldapURLContextFactory.getUsingURLIgnoreRootDN(ldapURLContextFactory.java:54)
[Container factory] at
com.sun.jndi.url.ldap.ldapURLContext.getRootURLContext(ldapURLContext.java:47)
[Container factory] at
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185)
[Container factory] at
com.sun.jndi.url.ldap.ldapURLContext.lookup(ldapURLContext.java:80)
[Container factory] at
javax.naming.InitialContext.lookup(InitialContext.java:350)
[Container factory] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.rebind(JRMPContainerInvoker.java:580)
[Container factory] at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.start(JRMPContainerInvoker.java:269)
[Container factory] at
org.jboss.ejb.StatefulSessionContainer.start(StatefulSessionContainer.java:228)
[Container factory] at
org.jboss.ejb.Application.start(Application.java:218)
[Container factory] at
org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:370)
[Container factory] at
org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:304)
[Container factory] at java.lang.reflect.Method.invoke(Native
Method)
[Container factory] at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Container factory] at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Container factory] at
org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:486)
[Container factory] at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:464)
[Container factory] at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:208)
[Container factory] at java.lang.reflect.Method.invoke(Native
Method)
[Container factory] at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Container factory] at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Container factory] at
org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
[Container factory] at
org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
[Container factory] at java.lang.Thread.run(Thread.java:484)
[J2EE Deployer Default] Starting admin-ejb.jar failed!
[Default] org.jboss.ejb.DeploymentException: Could not deploy
file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/deploy/Default/admin-ejb.jar,
Cause:javax.naming.NamingException [Root exception is
java.net.MalformedURLException: Not an LDAP URL: ldap:]
[Default]   at
org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:402)
[Default] 
[Default]   at
org.jboss.ejb.ContainerFactory.deploy(ContainerFactory.java:304)
[Default] 
[Default]   at java.lang.reflect.Method.invoke(Native Method)
[Default] 
[Default]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Default] 
[Default]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Default] 
[Default]   at
org.jboss.deployment.J2eeDeployer.startModules(J2eeDeployer.java:486)
[Default] 
[Default]   at
org.jboss.deployment.J2eeDeployer.startApplication(J2eeDeployer.java:464)
[Default] 
[Default]   at
org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:208)
[Default] 
[Default]   at java.lang.reflect.Method.invoke(Native Method)
[Default] 
[Default]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
[Default] 
[Default]   at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
[Default] 
[Default]   at
org.jboss.ejb.AutoDeployer.deploy(AutoDeployer.java:379)
[Default] 
[Default]   at org.jboss.ejb.AutoDeployer.run(AutoDeployer.java:217)
[Default] 
[Default]   at java.lang.Thread.run(Thread.java:484)
[Default] 
[J2EE Deployer Default] Module admin-ejb.jar is not running
[J2EE Deployer Default] Destroying application admin-ejb.jar
[AutoDeployer] Deploy

Re: [JBoss-dev] jboss daily test results

2001-07-12 Thread Chris Kimpton

Hi,

--- Scott M Stark <[EMAIL PROTECTED]> wrote:
> The test run includes less than half the current tests. Based on
> the run log
> it looks
> like the server ran out of threads during the lock test and the
> server
> shutsdown
> after than and all subsequent tests silently fail. What is the OS
> maker and
> version here?
> I see this is Sun's JDK 1.3.0 with a Linux 2.2.14 kernel, but from
> who?
> 

Well it was a SuSe build - but it was then upgraded to 2.2.14   ;-)


> [EnterpriseEntity_B,ERROR] TRANSACTION ROLLBACK EXCEPTION:unable to
> create
> new native thread; nested exception is:
>  java.lang.OutOfMemoryError: unable to create new native thread
> [EnterpriseEntity_B,ERROR] java.lang.OutOfMemoryError: unable to
> create new
> native thread


Is it a thread problem - or memory?  Have the tests grown at all
recently - such that the default sizings are insufficient?

I am re-running them to see if it works now.

Chris

=
Need somewhere to Live in London - http://freeflats.com

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jboss daily test results

2001-07-12 Thread Chris Kimpton

Hi,
> 
> I am re-running them to see if it works now.
> 

All clean now...

> SUMMARY
> 
> Number of tests run:   132
> 
> 
> 
> Successful tests:  132
> 
> Errors:0
> 
> Failures:  0
> 
> 
> 
> [time of test: 12 July 2001 13:13 GMT]


wierd...

Chris

=
Need somewhere to Live in London - http://freeflats.com

__
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jbosstest/src/build/stylesheets summary2.xsl

2001-07-12 Thread Chris Kimpton

  User: kimptoc 
  Date: 01/07/12 05:39:39

  Modified:src/build/stylesheets summary2.xsl
  Log:
  emphasise GMT time of running...
  
  Revision  ChangesPath
  1.4   +1 -1  jbosstest/src/build/stylesheets/summary2.xsl
  
  Index: summary2.xsl
  ===
  RCS file: /cvsroot/jboss/jbosstest/src/build/stylesheets/summary2.xsl,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- summary2.xsl  2001/05/27 09:02:25 1.3
  +++ summary2.xsl  2001/07/12 12:39:38 1.4
  @@ -34,7 +34,7 @@
   empty/half complete around that time
   
   
  -Date of last successful run: 
  +Date of last successful run:  GMT
   
Test Results
Javadocs of the JBoss modules
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] jboss daily test results

2001-07-12 Thread Bill Burke

Hey,  maybe we should tag everything in CVS as "LAST_CLEAN_BUILD" or
something.   Good work guys.

Bill

> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Chris
> Kimpton
> Sent: Thursday, July 12, 2001 8:38 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-dev] jboss daily test results
>
>
> Hi,
> >
> > I am re-running them to see if it works now.
> >
>
> All clean now...
>
> > SUMMARY
> >
> > Number of tests run:   132
> >
> > 
> >
> > Successful tests:  132
> >
> > Errors:0
> >
> > Failures:  0
> >
> > 
> >
> > [time of test: 12 July 2001 13:13 GMT]
>
>
> wierd...
>
> Chris
>
> =
> Need somewhere to Live in London - http://freeflats.com
>
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] Are XML files the right direction for storing configinformation

2001-07-12 Thread Roger Thomas

I've spent some time looking at Jboss for a project that could involve
the rolling out of a large number of Jboss systems to become a platform 
for a number of basic services.

The one thing I have found with all the app server solutions available is
that they all seem to be build on XML based files for configuration details.
While well structured and documented, these could be compaired to the
old MS .ini files, seen on WIN3. - A nice solution for a single system - but
a real pain if you have to manage/update 50 systems.

Is there any work going on to roll the information held within the XML
files, into other storage solutions - such as JNDI/LDAP.

In an idea world I would like to tell an instance of a Jboss server 
its reference(LDAP Object/context), user name and password and have
all other information be loaded via JNDI.

Are other people looking at this direction? and/or how much of the required
code is already available within Jboss.

Roger


 


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jaws_2_4.dtd not valid

2001-07-12 Thread danch (Dan Christopherson)

You can have only one definition of the datasource element - and that's 
all we need since it's the same either place (just contains CDATA). As 
long as it's listed as a possible contained element for both the global 
jaws element, and the entity-bean element, we should be fine. Unless I'm 
missing something.


-danch

Vinay Menon wrote:

> Mike,
> That is a bean level datasource and quite obviously cannot be commented
> out in principal! I mean if you got to have a bean level ds you got to have
> one! Client programs should be able to define a datasource at the file level
> i.e. applicable to all the beans declared in the jaws.xml and the datasource
> at the bean level essentially overrides it.
> 
> Vinay
> 
> - Original Message -
> From: "Mike Swainston-Rainford" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 11, 2001 11:40 PM
> Subject: [JBoss-dev] jaws_2_4.dtd not valid
> 
> 
> 
>>the jaws dtd is no longer valid. The datasource element is defined twice.
>>This mucks up any validating editor/parser (like XMLSpy) used to edit a
>>jaws.xml file.
>>
>>Suggest the second definition at line 69 is a comment thus:-
>>
>>
>>
>>
>>Mike S-R
>>
>>
>>___
>>Jboss-development mailing list
>>[EMAIL PROTECTED]
>>http://lists.sourceforge.net/lists/listinfo/jboss-development
>>
> 
> 
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
> 



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



RE: [JBoss-dev] Any problems vith the cache in 2.4?

2001-07-12 Thread Hiram Chirino

Here are some more specifics to the problem:

// CASE 1: Doing the following throws a an exception
TradingPartner tp = home.findByPrimaryKey(pk);
tp.remove();

// CASE 2: But if do this every thing is OK
TradingPartner tp = home.findByPrimaryKey(pk);
tp.getData();
tp.remove();

Here's the stack trace that I get with CASE 1:

[JAWS] Load command executing: SELECT 
DISP.TRADINGPARTNER.TPID,DISP.TRADINGPARTNER.UPDATETS,DISP.TRADINGPARTNER.UPDATEUSERID,DISP.TRADIN
[disp/TradingPartner] TRANSACTION ROLLBACK EXCEPTION:Load failed; nested 
exception is:
java.lang.IllegalArgumentException: object is not an instance of 
declaring class; nested exception is:
java.rmi.ServerException: Load failed; nested exception is:
java.lang.IllegalArgumentException: object is not an instance of 
declaring class
[disp/TradingPartner] java.rmi.ServerException: Load failed; nested 
exception is:
[disp/TradingPartner]   java.lang.IllegalArgumentException: object is not an 
instance of declaring class
[disp/TradingPartner] java.lang.IllegalArgumentException: object is not an 
instance of declaring class
[disp/TradingPartner]   at java.lang.reflect.Field.get(Native Method)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getPkFieldValue(JDBCCommand.java:663)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.setPrimaryKeyParameters(JDBCCommand.java:364)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.setParameters(JDBCLoadEntityCommand.java:163)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.jdbcExecute(JDBCCommand.java:159)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.jdbc.JDBCLoadEntityCommand.execute(JDBCLoadEntityCommand.java:147)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.loadEntity(JAWSPersistenceManager.java:156)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.CMPPersistenceManager.loadEntity(CMPPersistenceManager.java:365)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invoke(EntitySynchronizationInterceptor.java:263)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:253)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:298)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
[disp/TradingPartner]   at 
org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:349)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:480)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:335)
[disp/TradingPartner]   at 
org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke(EntityProxy.java:133)
[disp/TradingPartner]   at $Proxy63.remove(Unknown Source)
[disp/TradingPartner]   at 
com.commercequest.disp.servlet.TradingPartnerServlet.doEJBDelete(Unknown 
Source)
[disp/TradingPartner]   at 
com.commercequest.disp.servlet.TradingPartnerServlet.service(Unknown Source)
.

Regards,
Hiram

>From: "Hiram Chirino" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: RE: [JBoss-dev] Any problems vith the cache in 2.4?
>Date: Tue, 10 Jul 2001 01:10:58 -0400
>
>
>Talking about spooky cache problems, I've run into this problem:
>
>I disable the cache by using the 'NoPassivationCachePolicy' and Commit
>option 'C'.  I create a new bean instance.  Later I try to remove it but I
>fail (If you guys want, I'll get you guys a stack trace).  I am workin
>around the problem by loading the bean first by reading some of the values
>of the fields before I do the remove().  Seems to me like a cache problem
>since reading some fields makes it happy again.
>
>Anybody run into this??
>
>Regards,
>Hiram
>
>>From: "marc fleury" <[EMAIL PROTECTED]>
>>Reply-To: [EMAIL PROTECTED]
>>To: <[EMAIL PROTECTED]>
>>Subject: RE: [JBoss-dev] Any problems vith the cache in 2.4?
>>Date: Fri, 6 Jul 2001 08:28:18 -0400
>>
>>
>>
>>|-Original Message-
>>|From: [EMAIL PROTECTED]
>>|[mailto:[EMAIL PROTECTED]]On Behalf Of
>>|Lennart Petersson
>>|Sent: Friday, July 06, 2001 4:21 AM
>>|To: [EMAIL PROTECTED]
>>|Subject: SV: [JBoss-dev] Any problems vith the cache in 2.4?
>>|
>>|
>>|Hi! Problem 1 solved by you Vincent - that was the missing
>>|toString() method in the PK class (Should that really matter, why
>>|are JBoss using it in the cache?).
>>
>>that is not correct, we create a "safe" cache key so something is really
>>spooky
>>
>>marcf
>>
>>|
>>|Prob

RE: [JBoss-dev] Announcement: Documentation update and latest progress

2001-07-12 Thread Schaefer, Andreas

Hi Tobias

> * HT06 JMX Connector Description
as well as the "HowTo JMX Timer" is up to date with some
bugfixes I added.

Andy


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jaws_2_4.dtd

2001-07-12 Thread Scott M Stark

  User: starksm 
  Date: 01/07/12 10:38:26

  Modified:src/resources/org/jboss/metadata jaws_2_4.dtd
  Log:
  Remove the duplicate datasource ELEMENT
  
  Revision  ChangesPath
  1.4   +74 -58jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd
  
  Index: jaws_2_4.dtd
  ===
  RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jaws_2_4.dtd  2001/07/08 12:22:50 1.3
  +++ jaws_2_4.dtd  2001/07/12 17:38:26 1.4
  @@ -1,46 +1,56 @@
  +
  +
   
  -
  +-->
   
  -
  -
  + from standardjaws.xml -->
  +
  +
   
  -
   
  +Used in: jaws, entity
  + -->
  +
  +
   
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  + element that carries a separate meaning: This DTD wil not parse! -->
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
   
  -
  -
  + CMP bean in this ejb-jar that requires non-default column mapping behavior -->
  +
  +
   
  -
  -
  +-->
  +
  +
   
  -
  -
  -
  -
  -
  -
  -
  + in ejb-jar.xml. -->
  +
  +
  +
  +
  +
  +
  +
  +
   
  -
  -
  + option!-->
  +
  +
   
  -
  -
  + method from the bean's home interface -->
  +
  +
   
  -
  -
  + inner join clause, it may specify multiple tables. -->
  +
  +
   
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  \ No newline at end of file
  + query for the finder -->
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jaws_2_4.dtd

2001-07-12 Thread Scott M Stark

  User: starksm 
  Date: 01/07/12 10:39:47

  Modified:src/resources/org/jboss/metadata jaws_2_4.dtd
  Log:
  Remove the damn dos carriage returns
  
  Revision  ChangesPath
  1.5   +73 -73jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd
  
  Index: jaws_2_4.dtd
  ===
  RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- jaws_2_4.dtd  2001/07/12 17:38:26 1.4
  +++ jaws_2_4.dtd  2001/07/12 17:39:47 1.5
  @@ -1,17 +1,17 @@
  -
  -
  +
  +
   
  +-->
   
  -
  -
  + from standardjaws.xml -->
  +
  +
   
  -
  -
  + -->
  +
  +
   
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  + element that carries a separate meaning: This DTD wil not parse! -->
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
   
  -
  -
  + CMP bean in this ejb-jar that requires non-default column mapping behavior -->
  +
  +
   
  -
  -
  +-->
  +
  +
   
  -
  -
  -
  -
  -
  -
  -
  -
  + in ejb-jar.xml. -->
  +
  +
  +
  +
  +
  +
  +
  +
   
  -
  -
  + option!-->
  +
  +
   
  -
  -
  + method from the bean's home interface -->
  +
  +
   
  -
  -
  + inner join clause, it may specify multiple tables. -->
  +
  +
   
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  -
  + query for the finder -->
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  +
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jaws_2_4.dtd not valid

2001-07-12 Thread Scott M Stark

You can't define a DTD ELEMENT more than once. A defined element can be used
in the the content model of more than one ELEMENT. When you add an element
to
another elements content model you need to update the original ELEMENT
definition
to indicate how the element is interpreted in each context it is found. This
has been
done so the second datasource element simply needs to be removed. I have
done this.

- Original Message -
From: "Vinay Menon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 11, 2001 4:00 PM
Subject: Re: [JBoss-dev] jaws_2_4.dtd not valid


> Mike,
> That is a bean level datasource and quite obviously cannot be
commented
> out in principal! I mean if you got to have a bean level ds you got to
have
> one! Client programs should be able to define a datasource at the file
level
> i.e. applicable to all the beans declared in the jaws.xml and the
datasource
> at the bean level essentially overrides it.
>
> Vinay
>
> - Original Message -
> From: "Mike Swainston-Rainford" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 11, 2001 11:40 PM
> Subject: [JBoss-dev] jaws_2_4.dtd not valid
>
>
> > the jaws dtd is no longer valid. The datasource element is defined
twice.
> > This mucks up any validating editor/parser (like XMLSpy) used to edit a
> > jaws.xml file.
> >
> > Suggest the second definition at line 69 is a comment thus:-
> >
> > 
> > 
> >
> > Mike S-R
> >
> >
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadata jaws_2_4.dtd

2001-07-12 Thread Scott M Stark

  User: starksm 
  Date: 01/07/12 10:45:15

  Modified:src/resources/org/jboss/metadata Tag: Branch_2_4
jaws_2_4.dtd
  Log:
  Remove the duplicate datasource ELEMENT
  
  Revision  ChangesPath
  No   revision
  
  
  No   revision
  
  
  1.1.2.4   +3 -4  jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd
  
  Index: jaws_2_4.dtd
  ===
  RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- jaws_2_4.dtd  2001/07/11 15:27:01 1.1.2.3
  +++ jaws_2_4.dtd  2001/07/12 17:45:15 1.1.2.4
  @@ -17,6 +17,8 @@
context. The default is java:/DefaultDS 

Beans are also allowed to specify datasources at bean level and will override this 
datasource if specified.
  +
  +Used In: jaws, entity
-->
   
   
  @@ -64,9 +66,6 @@
   
   
  -
  -
   
   

Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing

2001-07-12 Thread Scott M Stark

I'll have to look into what is the deployer is attempting to bind into the
ldap
context. I'm working on other paid support issues so I don't have time at
the moment.

- Original Message -
From: "Nick Betteridge" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 3:33 AM
Subject: Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing


> I assumed that the ldap jars were part of java1.3. Still, I put the two
> ldap jars (ldap.jar and ldapbp.jar) into the lib/ext directory.
>
> This gave the following trace:
>
> [AutoDeployer] Auto deploy of
> file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/deploy/admin-ejb.jar
> [J2EE Deployer Default] Deploy J2EE application:
> file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/deploy/admin-ejb.jar
> [J2EE Deployer Default] Create application admin-ejb.jar
> [J2EE Deployer Default] install module admin-ejb.jar
> [Container factory]
>
Deploying:file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/deploy/De
fault/admin-ejb.jar
> [Verifier] Verifying
>
file:/export/home/nick/servers/jboss/JBoss-2.4.0BETA/tmp/deploy/Default/admi
n-ejb.jar/ejb1004.jar
> [Container factory] Deploying ClientEJB
> [Container factory] javax.naming.NamingException.  Root exception is
> java.net.MalformedURLException: Not an LDAP URL: ldap:
> [Container factory] at
> com.sun.jndi.ldap.LdapURL.parse(LdapURL.java:89)
> [Container factory] at
> com.sun.jndi.ldap.LdapURL.(LdapURL.java:73)
> [Container factory] at
>
com.sun.jndi.url.ldap.ldapURLContextFactory.getUsingURLIgnoreRootDN(ldapURLC
ontextFactory.java:54)
> [Container factory] at
>
com.sun.jndi.url.ldap.ldapURLContext.getRootURLContext(ldapURLContext.java:4
7)
> [Container factory] at
>
com.sun.jndi.toolkit.url.GenericURLContext.lookup(GenericURLContext.java:185
)
> [Container factory] at
> com.sun.jndi.url.ldap.ldapURLContext.lookup(ldapURLContext.java:80)
> [Container factory] at



___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] [ jboss-Bugs-440783 ] Verifier rejects RuntimeException

2001-07-12 Thread noreply

Bugs item #440783, was opened at 2001-07-12 11:26
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=440783&group_id=22866

Category: JBossServer
Group: v2.2.2 (stable)
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Verifier rejects RuntimeException

Initial Comment:
If an EJB business method throws clause includes a RuntimeException, then the Verifier 
issues a 
warning:

Section: 9.2.7
Warning: The method arguments in the remote interface must be of valid types for 
RMI/IIOP.

There are two problems: 1) the message is misleading and 2) there is nothing wrong 
with the 
method.

The RuntimeException constraint arises from an overzealous intrepretation of the 
Java-CORBA 
mapping spec by the jboss Verifier. The jboss Verifier considers a RuntimeException 
declared in a 
business method invalid because it has no CORBA mapping. True enough, but that's 
because none 
is needed. As the mapping spec (OMG document ptc/99-03-09) states:

"unchecked exception classes are assumed to be mapped to the implicit CORBA system 
exception, 
and are therefore not explicitly declared in OMG IDL."

The EJB spec allows throwing a RuntimeException from a business method, and in fact 
encourages 
it for certain well-defined situations (cf. Sec. 17.2.2, ejb 2.0 spec). The only note 
on _declaring_ a 
RuntimeException is the following:

"Note that the javax.ejb.EJBException is a subclass of the java.lang.RuntimeException, 
and 
therefore it does not have to be listed in the throws clauses of the business methods."

There is no firm edict _not_ to declare a RuntimeException in the method.

A RuntimeException declaration should be allowed. The work-around is simple--don't 
declare it--but 
the Verifier message does not lead one to this conclusion.

The relevant code is 
org.jboss.verifier.strategy.AbstractVerifier.isRMIIDLExceptionType(). This 
should only be called when validating an Exception parameter or return type, not a 
throws clause.


--

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=440783&group_id=22866

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] [ jboss-Bugs-440811 ] Jboss FORUMS

2001-07-12 Thread noreply

Bugs item #440811, was opened at 2001-07-12 12:59
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=440811&group_id=22866

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Jboss FORUMS

Initial Comment:
the bold, italic, and underline buttons exhiit random 
behaviour.  sometimes it prints out [b][/b][b][/b] 
twice instead of once.  oddly enough it only happens 
if you are on the first line of the message.

internet explorer 5.5
win2k professional.


--

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=376685&aid=440811&group_id=22866

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jboss daily test results

2001-07-12 Thread Jason Dillon

Could we have the detail of each test html'ifyed.  I would do it, but I
don't know much about xml stylesheets.  Mozilla just strips out all of the
tags, which makes it a bit hard to look at.

--jason


On Thu, 12 Jul 2001, Chris Kimpton wrote:

> Hi,
> >
> > I am re-running them to see if it works now.
> >
>
> All clean now...
>
> > SUMMARY
> >
> > Number of tests run:   132
> >
> > 
> >
> > Successful tests:  132
> >
> > Errors:0
> >
> > Failures:  0
> >
> > 
> >
> > [time of test: 12 July 2001 13:13 GMT]
>
>
> wierd...
>
> Chris
>
> =
> Need somewhere to Live in London - http://freeflats.com
>
> __
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] CVS update: jboss/src/resources/org/jboss/metadatajaws_2_4.dtd

2001-07-12 Thread Jason Dillon

I thought CVS did crlf translations... did we break it somehow?

--jason

On Thu, 12 Jul 2001, Scott M Stark wrote:

>   User: starksm
>   Date: 01/07/12 10:39:47
>
>   Modified:src/resources/org/jboss/metadata jaws_2_4.dtd
>   Log:
>   Remove the damn dos carriage returns
>
>   Revision  ChangesPath
>   1.5   +73 -73jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd
>
>   Index: jaws_2_4.dtd
>   ===
>   RCS file: /cvsroot/jboss/jboss/src/resources/org/jboss/metadata/jaws_2_4.dtd,v
>   retrieving revision 1.4
>   retrieving revision 1.5
>   diff -u -r1.4 -r1.5
>   --- jaws_2_4.dtd2001/07/12 17:38:26 1.4
>   +++ jaws_2_4.dtd2001/07/12 17:39:47 1.5
>   @@ -1,17 +1,17 @@
>   -
>   -
>   +
>   +
>
>   +-->
>
>   -enterprise-beans? , type-mappings?)>
>   -
>   + from standardjaws.xml -->
>   +enterprise-beans? , type-mappings?)>
>   +
>
>   -
>   -
>   + -->
>   +
>   +
>
>   -
>   -
>   -
>   -
>   -, pk-constraint? , select-for-update? , time-out)>
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   + element that carries a separate meaning: This DTD wil not parse! -->
>   +
>   +
>   +
>   +
>   +, pk-constraint? , select-for-update? , time-out)>
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>
>   -
>   -
>   + CMP bean in this ejb-jar that requires non-default column mapping behavior -->
>   +
>   +
>
>   -read-only? , table-name? , tuned-updates? , create-table? , remove-table? , 
>select-for-update? , time-out? , pk-constraint?)>
>   -
>   +-->
>   +read-only? , table-name? , tuned-updates? , create-table? , remove-table? , 
>select-for-update? , time-out? , pk-constraint?)>
>   +
>
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   + in ejb-jar.xml. -->
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>
>   -
>   -
>   + option!-->
>   +
>   +
>
>   -
>   -
>   + method from the bean's home interface -->
>   +
>   +
>
>   -
>   -
>   + inner join clause, it may specify multiple tables. -->
>   +
>   +
>
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   -
>   + query for the finder -->
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>   +
>
>
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/util Info.java InfoMBean.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 14:13:07

  Modified:src/main/org/jboss/util Info.java InfoMBean.java
  Log:
   o added methods to enable/disable vm method and instruction tracing if the
 target vm can do that.  Should probably be moved to a Debug mbean or
 something, but for now Info will work.
  
  Revision  ChangesPath
  1.13  +16 -1 jboss/src/main/org/jboss/util/Info.java
  
  Index: Info.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/Info.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Info.java 2001/07/09 22:58:59 1.12
  +++ Info.java 2001/07/12 21:13:07 1.13
  @@ -20,7 +20,8 @@
* @author mailto:[EMAIL PROTECTED]";>Rickard Öberg.
* @author mailto:[EMAIL PROTECTED]";>Scott Stark.
* @author mailto:[EMAIL PROTECTED]";>Hiram Chirino.
  - * @version $Revision: 1.12 $
  + * @author mailto:[EMAIL PROTECTED]";>Jason Dillon
  + * @version $Revision: 1.13 $
*/
   public class Info
  implements InfoMBean, MBeanRegistration
  @@ -178,5 +179,19 @@
"Total Thread Groups: "+activeGroups+""+
getThreadGroupInfo(root) ;
 return rc;
  +   }
  +
  +   /**
  +* Enable or disable tracing method calls at the Runtime level.
  +*/
  +   public void traceMethodCalls(final boolean flag) {
  +  Runtime.getRuntime().traceMethodCalls(flag);
  +   }
  +   
  +   /**
  +* Enable or disable tracing instructions the Runtime level.
  +*/
  +   public void traceInstructions(final boolean flag) {
  +  Runtime.getRuntime().traceInstructions(flag);
  }
   }
  
  
  
  1.6   +4 -1  jboss/src/main/org/jboss/util/InfoMBean.java
  
  Index: InfoMBean.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/InfoMBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- InfoMBean.java2001/07/09 22:55:06 1.5
  +++ InfoMBean.java2001/07/12 21:13:07 1.6
  @@ -13,7 +13,8 @@
*  
* @author mailto:[EMAIL PROTECTED]";>Rickard Öberg.
* @author mailto:[EMAIL PROTECTED]";>Hiram Chirino.
  - * @version $Revision: 1.5 $
  + * @author mailto:[EMAIL PROTECTED]";>Jason Dillon
  + * @version $Revision: 1.6 $
*/
   public interface InfoMBean
   {
  @@ -21,4 +22,6 @@
  String listSystemInfo();
  String listThreadDump();
  String runGarbageCollector();
  +   void traceMethodCalls(boolean flag);
  +   void traceInstructions(boolean flag);
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] jboss + jndi + ldap for ejb referencing

2001-07-12 Thread Nick Betteridge

I'll start to go through the deployer code first thing in the morning -
if you have any suggestions on where to look, I'd be very grateful.

All I'm trying to achieve is to set up the directory server with a URL
(ldap://ds.syntactics.com:389/o=application), specify a JNDI offset (ie
webshopgroup/ejb or cn=ejb, cn=webshopgroup, o=application) and then
allow clients to access the EJB references under the offset, so that
various groups in a company can have their ejbs referenced in various
LDAP hierarchies.

Ah, time for a glass of Pomerol.

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] Log4j xml config and custom priorities

2001-07-12 Thread Jason Dillon

I just learned this (from reading the log4j dtd) can be configured via:

 

  

The current version that JBoss is using still does not support setting the
CategoryFactory, but the CVS version of Log4j does have that in it's DTD.

--jason


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] Log4j xml config and custom priorities

2001-07-12 Thread Jason Dillon

Or not =(

--jason


On Thu, 12 Jul 2001, Jason Dillon wrote:

> I just learned this (from reading the log4j dtd) can be configured via:
>
>  
>class="org.jboss.logging.log4j.TracePriority"/>
>   
>
> The current version that JBoss is using still does not support setting the
> CategoryFactory, but the CVS version of Log4j does have that in it's DTD.
>
> --jason
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: manual/src/docs howtoejbdoclet.xml jbossdocs.xml

2001-07-12 Thread Ingo Br?ll

  User: ibruell 
  Date: 01/07/12 15:51:25

  Modified:src/docs jbossdocs.xml
  Added:   src/docs howtoejbdoclet.xml
  Log:
  added my first snapshot of a sjbdoclet howto
  
  Revision  ChangesPath
  1.21  +4 -2  manual/src/docs/jbossdocs.xml
  
  Index: jbossdocs.xml
  ===
  RCS file: /cvsroot/jboss/manual/src/docs/jbossdocs.xml,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- jbossdocs.xml 2001/07/07 21:56:57 1.20
  +++ jbossdocs.xml 2001/07/12 22:51:24 1.21
  @@ -34,6 +34,7 @@



  + 
   ]>
   

  @@ -53,7 +54,7 @@

Aaron
Mulder
  -
  + 
[EMAIL PROTECTED]

   &jdbc-database.xml;
  @@ -76,7 +77,7 @@
   &howtotimer.xml;
   &howtoj2eedeployer.xml;
   &howtojaas.xml;
  -&howtojavamail.xml; 
  +&howtojavamail.xml;
   &howtojbuilderdebug.xml;
   &howtovisualagedebug.xml;
   &howtonetbeansdebug.xml;
  @@ -88,5 +89,6 @@
   &howtoverifier.xml;
   &howtopetstore.xml;
   &howto_webcontainer.xml;
  +&howtoejbdoclet.xml;
   
   
  
  
  
  1.1  manual/src/docs/howtoejbdoclet.xml
  
  Index: howtoejbdoclet.xml
  ===
  
  
  
  
How to use EJBDoclet
In work(!)
  
 Author:

   Ingo
   Bruell

[EMAIL PROTECTED]
 
  

  EJBDoclet is a tool, that makes coding of Enterprise JavaBeans much easier. You 
only
  have to code one file to generate automaticly the needed
  Interfaces and descriptor files. With the usage of ant
  and the verifier it is very easy to produce correct Beans.


  EJBDoclet is a OpenSource project initiated by Rickard Oberg which stays at
  http://sf.net/projects/ejbdoclet";>sourceforge.net.

  

  Requirements
  
  
You only need to download the ejbdoclet.jar and put it somwhere in you 
classpath. I
think the usage of ant is very recommend (and for now the only way to use
ejbdoclet!).
  

  

  Creating the Bean as a Template
  
  
EJBDoclet uses JavaDoc Tags and the JavaDoc mechanism to generate the needed 
files
out of the "template". Here is an example of an Entity Bean class section:
  

  
  /**
   *   This is an account bean. It is an example of how to use the EJBDoclet tags.
   *
   *   @ejb:entity-cmp 
   *   @ejb:ejb-name bank/Account
   *   @ejb:jndi-name ejb/bank/Account
   *   @ejb:finder Collection findAll() 
   *   @ejb:finder Collection findByOwner(Customer owner)
   *   @ejb:finder Collection findLargeAccounts(int balance)
   *   @ejb:env-entry foo 1234 java.lang.Integer 
   *   @ejb:ejb-ref bank/Customer 
   *   @ejb:security-role-ref admin Administrator
   *   @ejb:permission Teller
   *   @ejb:transaction Required
   *   @ejb:use-soft-locking
   *
   *   JBoss specific 
   *   @jboss:container-configuration Standard CMP EntityBean
   *
   *   JBoss/JAWS CMP specific 
   *   @jboss:table-name account
   *   @jboss:create-table true
   *   @jboss:remove-table true
   *   @jboss:tuned-updates true
   *   @jboss:read-only false
   *   @jboss:finder-query findLargeAccounts $1 > 1000
   *   @jboss:finder-order findLargeAccounts balance
   */
  public abstract class AccountBean
  {


  

  Here is specified that this would be an Entity Bean

  
  

  Defining the finder methods

  
  

  Easy define envelope vars

  
  

  Define references to other beans

  
  

  With these tags you could specify JBoss specific parameters (see 
EJBDoclet docu
  for more details about the tags).

  
  

  And here you could define JAWS specific parameters (see EJBDoclet docu
  for more details about the tags).

  

How you can see it is very easy to create the Beanclass. The JBoss and JAWS 
specific
part should only be used, if the standard values of JBoss not fit.
  
  
Now you need to define the method level tags like this:

 /**
  * Create account.
  *
  * @ejb:permission Administrator 
  */
 public AccountPK ejbCreate(AccountData data)
throws CreateException
 {
  setId(data.getId());
setData(data);
  
return null;
 }
  
 /**
  * Id of this account.
  *
  * This is not remote since the primary key can be extracted by other means.
  *
  * @ejb:pk-field 
  * @ejb:persistent-field
  *
  * @jboss:column-name pk
  */

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb/plugins StatelessSessionInstanceInterceptor.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 16:53:02

  Modified:src/main/org/jboss/ejb/plugins
StatelessSessionInstanceInterceptor.java
  Log:
   o re-indent & removal of unused imports.
  
  Revision  ChangesPath
  1.8   +28 -50
jboss/src/main/org/jboss/ejb/plugins/StatelessSessionInstanceInterceptor.java
  
  Index: StatelessSessionInstanceInterceptor.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/StatelessSessionInstanceInterceptor.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- StatelessSessionInstanceInterceptor.java  2001/06/18 20:01:23 1.7
  +++ StatelessSessionInstanceInterceptor.java  2001/07/12 23:53:02 1.8
  @@ -6,40 +6,19 @@
*/
   package org.jboss.ejb.plugins;
   
  -import java.lang.reflect.Method;
   import java.rmi.RemoteException;
  -import java.util.Map;
  -import java.util.HashMap;
  -import java.util.ArrayList;
  -
  -import javax.ejb.EJBObject;
  -import javax.ejb.CreateException;
  -import javax.ejb.EJBException;
  -import javax.ejb.NoSuchEntityException;
  -import javax.ejb.RemoveException;
  -import javax.ejb.EntityBean;
  -import javax.transaction.Status;
  -import javax.transaction.Synchronization;
  -import javax.transaction.Transaction;
  -import javax.transaction.TransactionManager;
  -import javax.transaction.RollbackException;
  -import javax.transaction.SystemException;
   
   import org.jboss.ejb.Container;
  -import org.jboss.ejb.StatelessSessionContainer;
  -import org.jboss.ejb.EnterpriseContext;
  -import org.jboss.ejb.InstanceCache;
  -import org.jboss.ejb.InstancePool;
   import org.jboss.ejb.MethodInvocation;
  +import org.jboss.ejb.StatelessSessionContainer;
   
   /**
  - *   This container acquires the given instance. This must be used after
  - *   the EnvironmentInterceptor, since acquiring instances requires a proper
  - *   JNDI environment to be set
  + * This container acquires the given instance. This must be used after
  + * the EnvironmentInterceptor, since acquiring instances requires a proper
  + * JNDI environment to be set
*
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @version $Revision: 1.7 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @version $Revision: 1.8 $
*/
   public class StatelessSessionInstanceInterceptor
  extends AbstractInterceptor
  @@ -47,39 +26,40 @@
  // Constants -
   
  // Attributes 
  - protected StatelessSessionContainer container;
  +
  +   protected StatelessSessionContainer container;
  
  // Static 
   
  // Constructors --
  
  // Public 
  -   public void setContainer(Container container) 
  +
  +   public void setContainer(final Container container) 
  { 
  - this.container = (StatelessSessionContainer)container; 
  +  this.container = (StatelessSessionContainer)container; 
  }
   
  -   public  Container getContainer()
  +   public Container getContainer()
  {
  - return container;
  +  return container;
  }

  // Interceptor implementation --
  -   public Object invokeHome(MethodInvocation mi)
  -  throws Exception
  +   
  +   public Object invokeHome(final MethodInvocation mi) throws Exception
  {
  -   // We don't need an instance since the call will be handled by container
  +  // We don't need an instance since the call will be handled by container
 return getNext().invokeHome(mi);
  }
   
  -   public Object invoke(MethodInvocation mi)
  -  throws Exception
  +   public Object invoke(final MethodInvocation mi) throws Exception
  {
 // Get context
 mi.setEnterpriseContext(container.getInstancePool().get());
 
  -   // There is no need for synchronization since the instance is always fresh 
also there should
  -   // never be a tx associated with the instance.
  +  // There is no need for synchronization since the instance is always fresh 
also there should
  +  // never be a tx associated with the instance.
 
 try
 {
  @@ -87,23 +67,21 @@
return getNext().invoke(mi);
 } catch (RuntimeException e) // Instance will be GC'ed at MI return
 {
  - mi.setEnterpriseContext(null);
  - throw e;
  + mi.setEnterpriseContext(null);
  + throw e;
 } catch (RemoteException e) // Instance will be GC'ed at MI return
 {
  - mi.setEnterpriseContext(null);
  - throw e;
  + mi.setEnterpriseContext(null);
  + throw e;
   

Re: [JBoss-dev] EntityInstanceInterceptor change

2001-07-12 Thread Jason Dillon

Just a note, I started running everything with -classic and now I do not
even get passed the first request creation.  =(

--jason


On Wed, 11 Jul 2001, Scott M Stark wrote:

> Alright. Like I said the best starting point is a thread dump of the VM that
> appears to be hanging. Post it if you get one that looks interesting.
>
> - Original Message -
> From: "Jason Dillon" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 11, 2001 10:47 PM
> Subject: Re: [JBoss-dev] EntityInstanceInterceptor change
>
>
> > It is complicated.
> >
>
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb ContainerPlugin.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:19:46

  Modified:src/main/org/jboss/ejb ContainerPlugin.java
  Log:
   o re-indent & removal of public keyword
  
  Revision  ChangesPath
  1.6   +12 -12jboss/src/main/org/jboss/ejb/ContainerPlugin.java
  
  Index: ContainerPlugin.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerPlugin.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ContainerPlugin.java  2001/06/18 20:01:21 1.5
  +++ ContainerPlugin.java  2001/07/13 00:19:46 1.6
  @@ -9,21 +9,21 @@
   import org.jboss.util.Service;
   
   /**
  - *   This is a superinterface for all Container plugins. All plugin interfaces
  - * must extend this interface.
  + * This is a superinterface for all Container plugins.
  + * 
  + * All plugin interfaces must extend this interface.
*  
  - *   @see Service
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @version $Revision: 1.5 $
  + * @see Service
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @version $Revision: 1.6 $
*/
   public interface ContainerPlugin
  extends Service
   {
  -   // Public 
  - /**
  -  *  This callback is set by the container so that the plugin may access it
  -  *
  -  * @param   con  the container using this plugin
  -  */
  -   public void setContainer(Container con);
  +   /**
  +* This callback is set by the container so that the plugin may access it
  +*
  +* @param conThe container using this plugin.
  +*/
  +   void setContainer(Container con);
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/util Service.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:34:59

  Modified:src/main/org/jboss/util Service.java
  Log:
   o javadoc'd
  
  Revision  ChangesPath
  1.4   +25 -12jboss/src/main/org/jboss/util/Service.java
  
  Index: Service.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/Service.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Service.java  2001/06/18 20:01:28 1.3
  +++ Service.java  2001/07/13 00:34:59 1.4
  @@ -7,21 +7,34 @@
   package org.jboss.util;
   
   /**
  - *
  + * Defines a model for a service.
*  
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg.
  - *   @version $Revision: 1.3 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg.
  + * @version $Revision: 1.4 $
*/
   public interface Service
   {
  -   public void init()
  -  throws Exception;
  -  
  -   public void start()
  -  throws Exception;
  +   /**
  +* Initalize the service.
  +*
  +* @throws ExceptionService failed to initalize.
  +*/
  +   void init() throws Exception;
  +
  +   /**
  +* Start the service.
  +*
  +* @throws ExceptionService failed to start.
  +*/
  +   void start() throws Exception;
  +
  +   /**
  +* Stop the service.
  +*/
  +   void stop();
  
  -   public void stop();
  -   
  -   public void destroy();
  +   /**
  +* Destroy the service.
  +*/
  +   void destroy();
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb ContainerInvoker.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:36:33

  Modified:src/main/org/jboss/ejb ContainerInvoker.java
  Log:
   o re-indented & cleaned up javadoc
  
  Revision  ChangesPath
  1.8   +75 -78jboss/src/main/org/jboss/ejb/ContainerInvoker.java
  
  Index: ContainerInvoker.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerInvoker.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ContainerInvoker.java 2001/06/18 20:01:21 1.7
  +++ ContainerInvoker.java 2001/07/13 00:36:33 1.8
  @@ -12,92 +12,89 @@
   import javax.ejb.EJBMetaData;
   import javax.ejb.EJBHome;
   import javax.ejb.EJBObject;
  -import javax.naming.Name;
   
   /**
  - *   This is an interface for Container plugins. Implementations of this
  - *   interface are responsible for receiving remote invocations of EJB's
  - *   and to forward these requests to the Container it is being used with.
  + * This is an interface for Container plugins. Implementations of this
  + * interface are responsible for receiving remote invocations of EJB's
  + * and to forward these requests to the Container it is being used with.
*
  - *   It is responsible for providing any EJBObject and EJBHome implementations 
  - *   (which may be statically or dynamically created). 
  + * It is responsible for providing any EJBObject and EJBHome 
  + *implementations (which may be statically or dynamically created). 
*
  - *   Before forwarding a call to the container it must call 
Thread.setContextClassLoader()
  - *   with the classloader of the container. It must also handle any propagated 
transaction
  - *   and security contexts properly. It may acquire the TransactionManager from 
JNDI.
  + * Before forwarding a call to the container it must call
  + *Thread.setContextClassLoader() with the classloader of the container.
  + *It must also handle any propagated transaction and security contexts
  + *properly. It may acquire the TransactionManager from JNDI.
*
  - *   @see Container
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *  @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  - *   @version $Revision: 1.7 $
  + * @see Container
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  + * @version $Revision: 1.8 $
*/
   public interface ContainerInvoker
  extends ContainerPlugin
   {
  -   // Public 
  -
  - /**
  -  *  This method is called whenever the metadata for this container is
  -  *  needed.
  -  *
  -  * @return an implementation of the EJBMetaData interface
  -  */
  -   public EJBMetaData getEJBMetaData();
  -   
  -
  - /**
  -  *  This method is called whenever the EJBHome implementation for this
  -  *  container is needed.
  -  *
  -  * @return an implementation of the home interface for this container
  -  */
  -   public EJBHome getEJBHome();
  -   
  -
  - /**
  -  *  This method is called whenever an EJBObject implementation for a 
stateless
  -  *  session bean is needed.
  -  *
  -  * @return an implementation of the remote interface for this container
  -  * @exception   RemoteException  thrown if the EJBObject could not be created
  -  */
  -   public EJBObject getStatelessSessionEJBObject()
  -  throws RemoteException;
  -
  -
  - /**
  -  *  This method is called whenever an EJBObject implementation for a 
stateful
  -  *  session bean is needed.
  -  *
  -  * @param   id  the id of the session
  -  * @return an implementation of the remote interface for this container
  -  * @exception   RemoteException  thrown if the EJBObject could not be created
  -  */
  -   public EJBObject getStatefulSessionEJBObject(Object id)
  -  throws RemoteException;
  -
  -
  - /**
  -  *  This method is called whenever an EJBObject implementation for an 
entitybean
  -  * is needed.
  -  *
  -  * @param   id  the primary key of the entity
  -  * @return an implementation of the remote interface for this container
  -  * @exception   RemoteException  thrown if the EJBObject could not be created
  -  */
  -   public EJBObject getEntityEJBObject(Object id)
  -  throws RemoteException;
  -
  -
  - /**
  -  *  This method is called whenever a collection of EJBObjects for a 
collection of primary keys
  -  * is needed.
  -  *
  -  * @param   enum  enumeration of primary keys
  -  * @return a collection of EJBObjects implementing the remote interface 
for this container
  -  * @exception   RemoteException  thrown if the EJBObjects could not be created
  -  */
  -   public Collection getEntityCollection(Collection

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb InstancePoolContainer.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:39:13

  Modified:src/main/org/jboss/ejb InstancePoolContainer.java
  Log:
   o re-indent & javadoc'd
  
  Revision  ChangesPath
  1.4   +13 -15jboss/src/main/org/jboss/ejb/InstancePoolContainer.java
  
  Index: InstancePoolContainer.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/InstancePoolContainer.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- InstancePoolContainer.java2001/06/18 20:01:21 1.3
  +++ InstancePoolContainer.java2001/07/13 00:39:13 1.4
  @@ -6,26 +6,24 @@
*/
   package org.jboss.ejb;
   
  -import java.rmi.RemoteException;
  -import java.util.Collection;
  -
  -import javax.ejb.EJBMetaData;
  -import javax.ejb.EJBHome;
  -import javax.ejb.EJBObject;
  -import javax.naming.Name;
  -
   /**
  - *   This is an interface for Containers that uses InstancePools.
  + * This is an interface for Containers that uses InstancePools.
*
  - *   Plugins wanting to access pools from containers should use this interface
  + * Plugins wanting to access pools from containers should use this
  + *interface.
*
  - *   @see InstancePool
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @version $Revision: 1.3 $
  + * @see InstancePool
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @version $Revision: 1.4 $
*/
   public interface InstancePoolContainer
   {
  -   // Public 
  - public InstancePool getInstancePool();
  +   /**
  +* Get the instance pool for the container.
  +*
  +* @return   The instance pool for the container.
  +*/
  +   InstancePool getInstancePool();
   }
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb InstancePool.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:36:58

  Modified:src/main/org/jboss/ejb InstancePool.java
  Log:
   o re-indent & cleaned up javadoc
  
  Revision  ChangesPath
  1.5   +18 -27jboss/src/main/org/jboss/ejb/InstancePool.java
  
  Index: InstancePool.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/InstancePool.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- InstancePool.java 2001/06/18 20:01:21 1.4
  +++ InstancePool.java 2001/07/13 00:36:58 1.5
  @@ -9,48 +9,39 @@
   import java.rmi.RemoteException;
   
   /**
  - *
  + * Defines the model for a EnterpriseContext instance pool.
*  
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @version $Revision: 1.4 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @version $Revision: 1.5 $
*/
   public interface InstancePool
  extends ContainerPlugin
   {
  -   // Constants -
  -
  -   // Attributes 
  -
  -   // Static 
  -   
  -   // Constructors --
  -   
  -   // Public 
  /**
  -*   Get an instance without identity.
  -*   Can be used by finders and create-methods, or stateless beans
  +* Get an instance without identity.
  +* 
  +* Can be used by finders and create-methods, or stateless beans
   *
  -* @return Context /w instance
  -* @exception   RemoteException  
  +* @returnContext/w instance
  +* 
  +* @throws ExceptionRemoteException  
   */
  -   public EnterpriseContext get()
  -  throws Exception;
  +   EnterpriseContext get() throws Exception;
  
  /**
  -*   Return an anonymous instance after invocation.
  +* Return an anonymous instance after invocation.
   *
  -* @param   ctx  
  +* @param ctxThe context to free.
   */
  -   public void free(EnterpriseContext ctx);
  +   void free(EnterpriseContext ctx);
  
  /**
  -*   Discard an anonymous instance after invocation.
  -*   This is called if the instance should not be reused, perhaps due to some
  -*   exception being thrown from it.
  +* Discard an anonymous instance after invocation.
  +* This is called if the instance should not be reused, perhaps due to some
  +* exception being thrown from it.
   *
  -* @param   ctx  
  +* @param ctxThe context to discard.
   */
  -   public void discard(EnterpriseContext ctx);
  +   void discard(EnterpriseContext ctx);
   }
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb AutoDeployerMBean.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:42:49

  Modified:src/main/org/jboss/ejb AutoDeployerMBean.java
  Log:
   o javadoc'd
  
  Revision  ChangesPath
  1.6   +38 -15jboss/src/main/org/jboss/ejb/AutoDeployerMBean.java
  
  Index: AutoDeployerMBean.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/AutoDeployerMBean.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AutoDeployerMBean.java2001/06/18 20:01:21 1.5
  +++ AutoDeployerMBean.java2001/07/13 00:42:49 1.6
  @@ -9,24 +9,47 @@
   import org.jboss.util.ServiceMBean;
   
   /**
  - *   This is the interface of the AutoDeployer that is exposed for
  - *   administration
  + * This is the interface of the AutoDeployer that is exposed for
  + * administration
*  
  - *   @see AutoDeployer
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @author mailto:[EMAIL PROTECTED]";>Toby Allsopp
  - *   @version $Revision: 1.5 $
  + * @see AutoDeployer
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Toby Allsopp
  + * @version $Revision: 1.6 $
*/
   public interface AutoDeployerMBean
  - extends ServiceMBean
  +   extends ServiceMBean
   {
  -   // Constants -
  -   public static final String OBJECT_NAME = "EJB:service=AutoDeployer";
  -
  -   // Public 
  -   public void setURLs(String urlList);
  -   public String getURLs();
  -   public void setDeployers(String deployers);
  -   public String getDeployers();
  +   /** The default object name. */
  +   String OBJECT_NAME = "EJB:service=AutoDeployer";
  +
  +   /**
  +* Set the list of urls to watch.
  +*
  +* @param urlListThe list of urls to watch.
  +*/
  +   void setURLs(String urlList);
  +
  +   /**
  +* Get the list of urls that are currently being watched.
  +*
  +* @return   The list of urls that are currently being watched.
  +*/
  +   String getURLs();
  +
  +   /**
  +* Set the list of deployers that will be used.
  +*
  +* @param deployersThe list of deployers that will be used.
  +*/
  +   void setDeployers(String deployers);
  +   
  +   /**
  +* Get the list of deployers that is currently being used.
  +*
  +* @return   The list of deployers that is currently being used.
  +*/
  +   String getDeployers();
   }
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb InstanceCache.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:36:07

  Modified:src/main/org/jboss/ejb InstanceCache.java
  Log:
   o re-indent, cleaned up javadoc
  
  Revision  ChangesPath
  1.8   +56 -47jboss/src/main/org/jboss/ejb/InstanceCache.java
  
  Index: InstanceCache.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/InstanceCache.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InstanceCache.java2001/06/18 20:01:21 1.7
  +++ InstanceCache.java2001/07/13 00:36:07 1.8
  @@ -10,67 +10,76 @@
   import java.rmi.NoSuchObjectException;
   
   /**
  - *   The plugin that gives a container a cache for bean instances.
  + * The plugin that gives a container a cache for bean instances.
*  
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *  @author mailto:[EMAIL PROTECTED]";>Simone Bordet
  - *   @version $Revision: 1.7 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Simone Bordet
  + * @version $Revision: 1.8 $
*/
   public interface InstanceCache
  extends ContainerPlugin
   {
  /**
  -   *   Gets a bean instance from this cache given the identity.
  -   *   This method may involve activation if the instance is not in the cache.
  -   * Implementation should have O(1) complexity.
  -   *   This method is never called for stateless session beans.
  -   *
  -   * @param id the primary key of the bean 
  -   * @return the EnterpriseContext related to the given id
  -   * @exception RemoteException in case of illegal calls (concurrent / reentrant),
  -   *  NoSuchObjectException if the bean cannot be found.
  -   * @see #release  
  -   */
  -   public EnterpriseContext get(Object id)
  -   throws RemoteException, NoSuchObjectException;
  +* Gets a bean instance from this cache given the identity.  This method
  +* may involve activation if the instance is not in the cache.
  +* 
  +* Implementation should have O(1) complexity.
  +* 
  +* This method is never called for stateless session beans.
  +*
  +* @param idThe primary key of the bean .
  +* @return  The EnterpriseContext related to the given id.
  +* 
  +* @throws RemoteException  In case of illegal calls (concurrent /
  +*  reentrant)
  +* @throws NoSuchObjectExceptionif the bean cannot be found.
  +*
  +* @see #release
  +*/
  +   EnterpriseContext get(Object id)
  +  throws RemoteException, NoSuchObjectException;
   
  /**
  -   *   Inserts an active bean instance after creation or activation. 
  -   * Implementation should guarantee proper locking and O(1) complexity.
  -   *
  -   * @param ctx the EnterpriseContext to insert in the cache
  -   * @see #remove
  -   */
  -   public void insert(EnterpriseContext ctx);
  +* Inserts an active bean instance after creation or activation.
  +* 
  +* Implementation should guarantee proper locking and O(1) complexity.
  +*
  +* @param ctxThe EnterpriseContext to insert in the cache
  +* 
  +* @see #remove
  +*/
  +   void insert(EnterpriseContext ctx);
   
  /**
  -   *   Releases the given bean instance from this cache.
  -   * This method may passivate the bean to get it out of the cache.
  -   * Implementation should return almost immediately leaving the
  -   * passivation to be executed by another thread.
  -   *
  -   * @param ctx the EnterpriseContext to release
  -   * @see #get
  -   */
  -   public void release(EnterpriseContext ctx);
  +* Releases the given bean instance from this cache.
  +* This method may passivate the bean to get it out of the cache.
  +* Implementation should return almost immediately leaving the
  +* passivation to be executed by another thread.
  +*
  +* @param ctxThe EnterpriseContext to release
  +* 
  +* @see #get
  +*/
  +   void release(EnterpriseContext ctx);
   
  /**
  -   *   Removes a bean instance from this cache given the identity.
  -   * Implementation should have O(1) complexity and guarantee proper locking.
  -   *
  -   * @param id the pimary key of the bean
  -   * @see #insert
  -   */
  -   public void remove(Object id);
  +* Removes a bean instance from this cache given the identity.
  +* Implementation should have O(1) complexity and guarantee proper locking.
  +*
  +* @param idThe pimary key of the bean.
  +* 
  +* @see #insert
  +*/
  +   void remove(Object id);
   
  /**
  -   *   Checks whether an instance corresponding to a particular id is active
  -   *
  -   * @param id the pimary key of the bean
  -   * @see #insert
  -   */
  -   public boolean isActive(Object id);
  -   
  +* Checks whether an instance corresponding to a particular

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb CacheKey.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 17:45:26

  Modified:src/main/org/jboss/ejb CacheKey.java
  Log:
   o re-indent
  
  Revision  ChangesPath
  1.15  +113 -113  jboss/src/main/org/jboss/ejb/CacheKey.java
  
  Index: CacheKey.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/CacheKey.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- CacheKey.java 2001/07/10 04:42:58 1.14
  +++ CacheKey.java 2001/07/13 00:45:26 1.15
  @@ -7,6 +7,10 @@
   package org.jboss.ejb;
   
   import java.io.Externalizable;
  +import java.io.ObjectOutput;
  +import java.io.ObjectInput;
  +import java.io.IOException;
  +
   import java.rmi.MarshalledObject;
   
   import org.apache.log4j.Category;
  @@ -25,134 +29,130 @@
* 
* @author mailto:[EMAIL PROTECTED]";>Marc Fleury
* @author Bill Burke
  - * @version $Revision: 1.14 $
  + * @version $Revision: 1.15 $
*/
   public class CacheKey
  -implements Externalizable
  +   implements Externalizable
   {
  -// Constants -
  +   // Constants -
   
  -// Attributes 
  +   // Attributes 
   
  -/**
  - * The database primaryKey.
  - * 
  - * This primaryKey is used by:
  - *
  - * org.jboss.ejb.plugins.EntityInstanceCache.setKey() - to set the 
EntityEnterpriseContext id
  - * org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke():
  - * - implementing Entity.toString() --> cacheKey.getId().toString()
  - * - implementing Entity.hashCode() --> cacheKey.getId().hashCode()
  - * - etc...
  - * org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.EntityProxy.getId()
  - */
  -protected Object id;
  +   /**
  +* The database primaryKey.
  +* 
  +* This primaryKey is used by:
  +*
  +* org.jboss.ejb.plugins.EntityInstanceCache.setKey() - to set the 
EntityEnterpriseContext id
  +* org.jboss.ejb.plugins.jrmp.interfaces.EntityProxy.invoke():
  +* - implementing Entity.toString() --> cacheKey.getId().toString()
  +* - implementing Entity.hashCode() --> cacheKey.getId().hashCode()
  +* - etc...
  +* org.jboss.ejb.plugins.local.BaseLocalContainerInvoker.EntityProxy.getId()
  +*/
  +   protected Object id;
  
  -public Object getId()
  -{
  - return id;
  -}
  +   public Object getId()
  +   {
  +  return id;
  +   }

  -/** The Marshalled Object representing the key */
  -protected MarshalledObject mo;
  +   /** The Marshalled Object representing the key */
  +   protected MarshalledObject mo;
   
  -/** The Marshalled Object's hashcode */
  -protected int hashCode;
  +   /** The Marshalled Object's hashcode */
  +   protected int hashCode;
   
  -// Static   
  +   // Static   
   
  -// Public 
  +   // Public 
   
  -public CacheKey() {
  -   // For externalization only
  -}
  +   public CacheKey() {
  +  // For externalization only
  +   }
   
  -public CacheKey(Object id) {
  -// why does this throw an error and not an IllegalArgumentException ?
  - if (id == null) throw new Error("id may not be null");
  +   public CacheKey(Object id) {
  +  // why does this throw an error and not an IllegalArgumentException ?
  +  if (id == null) throw new Error("id may not be null");

  - this.id = null;
  +  this.id = null;
   
  - try {
  - // Equals rely on the MarshalledObject itself
  - mo =  new MarshalledObject(id);
  - // Make a copy of the id to enforce copy semantics and 
  - // allow reuse of the original primary key
  - this.id = mo.get();
  - // Precompute the hashCode (speed)
  - hashCode = mo.hashCode();
  - }
  - catch (Exception e) {
  -   //
  -   // should probably throw a nested exception here, but
  -   // for now instead of printStackTrace, lets log it
  -   //
  -   Category log = Category.getInstance(this.getClass());
  -   log.error("failed to initialize", e);
  -}
  -}
  -
  -// Z implementation --
  -
  -// Package protected -
  -
  -// Protected -
  -
  -// Private ---
  -
  -public void write

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb ContainerFactoryMBean.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 18:00:20

  Modified:src/main/org/jboss/ejb ContainerFactoryMBean.java
  Log:
   o re-ident & cleaned up javadoc
  
  Revision  ChangesPath
  1.14  +82 -71jboss/src/main/org/jboss/ejb/ContainerFactoryMBean.java
  
  Index: ContainerFactoryMBean.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/ContainerFactoryMBean.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ContainerFactoryMBean.java2001/06/18 20:01:21 1.13
  +++ ContainerFactoryMBean.java2001/07/13 01:00:19 1.14
  @@ -6,132 +6,143 @@
*/
   package org.jboss.ejb;
   
  +import java.util.Iterator;
   import java.net.MalformedURLException;
   
  +import org.jboss.util.ServiceMBean;
  +
   /**
  - *   This is the interface of the ContainerFactory that is exposed for 
administration
  - *
  - *   @see ContainerFactory
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @author mailto:[EMAIL PROTECTED]";>Juha Lindfors
  + * This is the interface of the ContainerFactory that is exposed
  + * for administration.
*
  - *   @version $Revision: 1.13 $
  + * @see ContainerFactory
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Juha Lindfors
  + * @version $Revision: 1.14 $
*/
   public interface ContainerFactoryMBean
  - extends org.jboss.util.ServiceMBean
  +   extends ServiceMBean
   {
  -   // Constants -
  -   public static String OBJECT_NAME = ":service=ContainerFactory";
  -
  -   // Public 
  +   /** The default object name. */
  +   String OBJECT_NAME = ":service=ContainerFactory";
   
  /**
   * Returns the applications deployed by the container factory
   */
  -   public java.util.Iterator getDeployedApplications();
  +   Iterator getDeployedApplications();
  +   
  /**
  -  *  Deploy an application
  -  *
  -  * @param   url URL to the directory with the given EJBs to be deployed
  -* @param   appId Id of the application this EJBs belongs to
  -*used for management
  -  * @exception   MalformedURLException
  -  * @exception   DeploymentException
  -  */
  -   public void deploy(String url, String appId )
  +* Deploy an application
  +*
  +* @param url  URL to the directory with the given EJBs to be deployed
  +* @param appIdId of the application this EJBs belongs to
  +* used for management
  +* 
  +* @throws MalformedURLException
  +* @throws DeploymentException
  +*/
  +   void deploy(String url, String appId )
 throws MalformedURLException, DeploymentException;
   
  /**
  -  *  Deploy an application
  -  *
  -* @param   appUrl Url to the application itself
  -* @param   jarUrls Array of URLs to the JAR files containing the EJBs
  -* @param   appId Id of the application this EJBs belongs to
  -*used for management
  -  * @exception   MalformedURLException
  -  * @exception   DeploymentException
  -  */
  -   public void deploy( String appUurl, String[] jarUrls, String appId )
  +* Deploy an application
  +*
  +* @param appUrl Url to the application itself
  +* @param jarUrlsArray of URLs to the JAR files containing the EJBs
  +* @param appId  Id of the application this EJBs belongs to
  +*   used for management
  +*   
  +* @throws MalformedURLException
  +* @throws DeploymentException
  +*/
  +   void deploy( String appUurl, String[] jarUrls, String appId )
 throws MalformedURLException, DeploymentException;
   
  - /**
  -  *  Undeploy an application
  -  *
  -  * @param   url
  -  * @exception   MalformedURLException
  -  * @exception   DeploymentException
  -  */
  -   public void undeploy(String url)
  +   /**
  +* Undeploy an application
  +*
  +* @param url
  +* 
  +* @throws MalformedURLException
  +* @throws DeploymentException
  +*/
  +   void undeploy(String url)
 throws MalformedURLException, DeploymentException;
   
  /**
   * Enable/disable bean verification upon deployment.
   *
  -* @paramverify  true to enable the verifier; false to disable
  +* @param verifytrue to enable the verifier; false to disable
   */
  -   public void setVerifyDeployments(boolean verify);
  +   void setVerifyDeployments(boolean verify);
   
  /**
   * Returns the state of the verifier (enabled/disabled)
   *
   * @return   true if verifier is enabled; false otherwise
   */
  -   public boolean getVerifyDeployments();
  +   boolean getVerifyDeployments();
  

[JBoss-dev] CVS update: jboss/src/main/org/jboss/util Shutdown.java ShutdownMBean.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 18:22:26

  Modified:src/main/org/jboss/util Shutdown.java ShutdownMBean.java
  Log:
   o added support to invoke Runtime.halt()
   o added a tad bit more logging
  
  Revision  ChangesPath
  1.6   +59 -18jboss/src/main/org/jboss/util/Shutdown.java
  
  Index: Shutdown.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/Shutdown.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Shutdown.java 2001/06/22 23:11:15 1.5
  +++ Shutdown.java 2001/07/13 01:22:26 1.6
  @@ -6,62 +6,94 @@
*/
   package org.jboss.util;
   
  -import java.io.*;
  -import java.net.*;
  -import java.util.*;
  +import java.util.List;
  +import java.util.ArrayList;
   
  -import org.apache.log4j.Category;
  +import javax.management.MBeanRegistration;
  +import javax.management.MBeanRegistration;
  +import javax.management.MBeanServer;
  +import javax.management.ObjectName;
   
  -import javax.management.*;
  +import org.apache.log4j.Category;
   
   /**
* Shutdown service.  Installs a hook to cleanly shutdown the server and
* provides the ability to handle user shutdown requests.
*  
  - * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg.
  - * @version $Revision: 1.5 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Jason Dillon
  + * @version $Revision: 1.6 $
*/
   public class Shutdown
  implements MBeanRegistration, ShutdownMBean
   {
  // Constants -
   
  +   /** The default object name to use. */
  public static final String OBJECT_NAME = ":type=Shutdown";
  
  // Attributes 
   
  /** Instance logger. */
  private final Category log = Category.getInstance(Shutdown.class);
  -   
  -   List mbeans = new ArrayList();
  -   MBeanServer server;
  +
  +   /** The MBean server we are attached to. */
  +   private MBeanServer server;
  
  // Public  ---
  +
  +   /**
  +* Shutdown the virtual machine and run shutdown hooks.
  +*/
  public void shutdown()
  {
  +  log.info("Shutting down");
 System.exit(0); // This will execute the shutdown hook
  }
  +
  +   /**
  +* Forcibly terminates the currently running Java virtual machine.
  +*/
  +   public void halt()
  +   {
  +  System.err.println("Halting the system now!");
  +  Runtime.getRuntime().halt(0);
  +   }
  
  // MBeanRegistration implementation --
   
  -   public ObjectName preRegister(final MBeanServer server, ObjectName name)
  +   /**
  +* Saves a reference to the MBean server for later use and installs
  +* a shutdown hook.
  +*
  +* @param serverThe MBean server which we are going to be registered.
  +* @param name  The object name we have been configured to use.
  +* @return  Our preferred object name.
  +*
  +* @throws MalformedObjectNameException
  +*/
  +   public ObjectName preRegister(final MBeanServer server,
  + final ObjectName name)
 throws Exception
  {
 this.server = server;
 try
 {
  - Runtime.getRuntime().addShutdownHook(new Thread()
  + Runtime.getRuntime().addShutdownHook(new Thread("JBoss Shutdown Hook")
{
   public void run()
   {
  +   log.info("Shutting down all services");
  System.out.println("Shutting down");
  
  // Make sure all services are down properly
  shutdownServices();
  -   
  +
  +   log.info("Shutdown complete");
  System.out.println("Shutdown complete");
   }
});
  + 
log.info("Shutdown hook added");
 } catch (Throwable e)
 {
  @@ -72,23 +104,31 @@
  
  public void postRegister(Boolean registrationDone)
  {
  +  // empty
  }
  
  -   public void preDeregister()
  -  throws Exception
  +   public void preDeregister() throws Exception
  {
  +  // empty
  }
  
  public void postDeregister()
  {
  +  // empty
  }
  -   
  +
  +   /**
  +* Attempt to stop and destroy all services
  +* running inside of the MBean server which we are attached too by
  +* asking the ServiceControl to do the dirty work.
  +*/
  protected void shutdownServices()
  {
 try
 {
// Stop services
  - server.invoke(new ObjectName(":service=ServiceControl"), "stop", new 
Object[0] , new String[0]);
  + server.invoke(new ObjectName(":service=ServiceControl"),
  +   "

[JBoss-dev] CVS update: jboss/src/main/org/jboss Shutdown.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 18:22:58

  Modified:src/main/org/jboss Shutdown.java
  Log:
   o re-indented & using different URL contructor
  
  Revision  ChangesPath
  1.2   +55 -41jboss/src/main/org/jboss/Shutdown.java
  
  Index: Shutdown.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/Shutdown.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Shutdown.java 2001/03/27 16:32:39 1.1
  +++ Shutdown.java 2001/07/13 01:22:58 1.2
  @@ -7,50 +7,64 @@
   
   package org.jboss;
   
  -import java.io.*;
  -import java.net.*;
  -import java.util.*;
  +import java.net.URL;
   
   /**
  -  * Provides an OS-independent way of shutting down JBoss.  This
  -  * works by accessing the JMX server and giving it the shutdown
  -  * command.  The host to the JMX server can be passed in as well
  -  * as the port number.  If neither is supplied, the defaults of
  -  * localhost and 8082 are used.
  -  * 
  -  * 
  -  * Usage:  java org.jboss.Shutdown [host] [port]
  -  * 
  -  * 
  -  *
  -  * @author Dewayne McNair ([EMAIL PROTECTED])
  -  * @version $Revision: 1.1 $
  -  */
  + * Provides an OS-independent way of shutting down JBoss.  This
  + * works by accessing the JMX server and giving it the shutdown
  + * command.  The host to the JMX server can be passed in as well
  + * as the port number.  If neither is supplied, the defaults of
  + * localhost and 8082 are used.
  + * 
  + * Usage:
  + * 
  + * java org.jboss.Shutdown [host] [port]
  + * 
  + *
  + * @author mailto:[EMAIL PROTECTED]";>Dewayne McNair
  + * @author mailto:[EMAIL PROTECTED]";>Jason Dillon
  + * @version $Revision: 1.2 $
  + */
   public class Shutdown
   {
  -private static final String command =
  - 
"/InvokeAction//DefaultDomain%3Atype%3DShutdown/action=shutdown?action=shutdown";
  +   private static final String COMMAND =
  +  
"/InvokeAction//DefaultDomain%3Atype%3DShutdown/action=shutdown?action=shutdown";
   
  -public static void main (String argv[])
  -{
  -String host = "localhost";
  -String port = "8082";
  -
  -if (argv.length == 1)
  -host = argv[0];
  -
  -if (argv.length == 2)
  -port = argv[1];
  -
  -try
  -{
  -URL url = new URL ("http://"; + host + ":" + port + command);
  -url.getContent();
  -}
  -catch (Exception e)
  -{
  -// we do nothing because even if everything went
  -// right, ie JBoss is shutdown, we'd get an exception
  -}
  -}
  +   /**
  +* Parse the command line and shutdown the remote server.
  +*
  +* @param argv   Comamne line arguments.
  +*
  +* @throws Exception Invalid port number.
  +*/
  +   public static void main(final String argv[]) throws Exception
  +   {
  +  String host = "localhost";
  +  int port = 8082;
  +
  +  if (argv.length == 1) {
  + host = argv[0];
  +  }
  +
  +  if (argv.length == 2) {
  + port = Integer.parseInt(argv[1]);
  +  }
  +
  +  shutdown(host, port);
  +   }
  +
  +   /**
  +* Connect to the JBoss servers HTML JMX adapter and invoke the
  +* shutdown service.
  +*/
  +   public static void shutdown(final String host, final int port) {
  +  try {
  + URL url = new URL("http", host, port, COMMAND);
  + url.getContent();
  +  }
  +  catch (Exception ignore) {
  + // we do nothing because even if everything went
  + // right, ie JBoss is shutdown, we'd get an exception
  +  }
  +   }
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb DeploymentException.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 18:30:17

  Modified:src/main/org/jboss/ejb DeploymentException.java
  Log:
   o reindent
  
  Revision  ChangesPath
  1.6   +20 -10jboss/src/main/org/jboss/ejb/DeploymentException.java
  
  Index: DeploymentException.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/DeploymentException.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DeploymentException.java  2001/06/18 20:01:21 1.5
  +++ DeploymentException.java  2001/07/13 01:30:17 1.6
  @@ -7,23 +7,26 @@
   package org.jboss.ejb;
   
   /**
  - *   This exception is thrown by the ContainerFactory if an EJB application
  - *   could not be deployed
  + * This exception is thrown by the ContainerFactory if an EJB application
  + * could not be deployed.
*
  - *   @see ContainerFactory
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @version $Revision: 1.5 $
  + * @see ContainerFactory
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @version $Revision: 1.6 $
*/
   public class DeploymentException
  extends Exception
   {
  // Attributes 
  - // The root cause of this exception
  -   Exception cause;
  +
  +   /** The root cause of this exception */
  +   protected Exception cause;
  
  // Static 
   
  // Constructors --
  +   
  public DeploymentException(String message)
  {
 super(message);
  @@ -32,12 +35,19 @@
  public DeploymentException(String message, Exception e)
  {
 super(message);
  -  
 cause = e;
  }
  
  // Public 
  -   public Exception getCause() { return cause; }
  
  -   public String toString() { return cause == null ? super.toString() : 
super.toString()+", Cause:"+cause; }
  +   public Exception getCause() {
  +  return cause;
  +   }
  +   
  +   public String toString() {
  +  return
  + cause == null ?
  + super.toString() :
  + super.toString() + ", Cause: " + cause;
  +   }
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb EntityCache.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 18:33:15

  Modified:src/main/org/jboss/ejb EntityCache.java
  Log:
   o re-indent & javadoc clean up
  
  Revision  ChangesPath
  1.3   +13 -18jboss/src/main/org/jboss/ejb/EntityCache.java
  
  Index: EntityCache.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityCache.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- EntityCache.java  2001/06/18 20:01:21 1.2
  +++ EntityCache.java  2001/07/13 01:33:15 1.3
  @@ -1,35 +1,30 @@
  -package org.jboss.ejb;
  -
   /*
* JBoss, the OpenSource EJB server
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
  -
  -import java.rmi.RemoteException;
  -import javax.ejb.NoSuchEntityException;
  +package org.jboss.ejb;
   
   /**
  - *   EntityCaches can work from several keys
  + * EntityCaches can work from several keys.
*
  - *  A cache can use the natural primaryKey from the EJBObject, or DB dependent
  - *  keys or a proprietary key
  + * A cache can use the natural primaryKey from the EJBObject, or DB
  + *dependent keys or a proprietary key
*
  - *   @see EntityInstanceCache
  - *   @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  - *   @version $Revision: 1.2 $
  + * @see EntityInstanceCache
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  + * @version $Revision: 1.3 $
*/
   public interface EntityCache
  extends InstanceCache
   {
  /**
   * Returns the key used to cache the context
  - *
  - * @param id Object id / primary key
  - *
  - * @return   Cache key
  - */
  -   public Object createCacheKey( Object id );
  -
  +*
  +* @param idObject id / primary key
  +* @return  Cache key
  +*/
  +   Object createCacheKey(Object id);
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] jboss daily test results

2001-07-12 Thread chris



JBoss daily test results

SUMMARY

Number of tests run:   123



Successful tests:  119

Errors:1

Failures:  3



[time of test: 13 July 2001 2:59 GMT]

See http://lubega.com for full details

NOTE: If there are any errors shown above - this mail is only highlighting 
them - it is NOT indicating that they are being looked at by anyone.

It is assumed that whoever makes change(s) to jboss that 
break the test will be fixing the test or jboss, as appropriate!




DETAILS OF ERRORS



Suite:   org.jboss.test.bank.test.Main
Test:testMultiThread
Type:error
Exception:   org.jboss.test.bank.interfaces.BankException
Message: Could not transfer 50.0 from bank/Account:5678.Marc.994988486689 to 
bank/Account:5678.Rickard.994988486690
Stack Trace:
org.jboss.test.bank.interfaces.BankException: Could not transfer 50.0 from 
bank/Account:5678.Marc.994988486689 to bank/Account:5678.Rickard.994988486690, 
Cause:java.lang.reflect.UndeclaredThrowableException
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker_Stub.invoke(Unknown 
Source)
at 
org.jboss.ejb.plugins.jrmp.interfaces.GenericProxy.invokeContainer(GenericProxy.java:362)
at 
org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:123)
at $Proxy5.transfer(Unknown Source)
at org.jboss.test.bank.test.Main$1.run(Main.java:190)
at java.lang.Thread.run(Thread.java:484)

-



Suite:   org.jboss.test.lock.test.Main
Test:testB2B
Type:failure
Exception:   junit.framework.AssertionFailedError
Message: 
Stack Trace:
junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:143)
at junit.framework.Assert.assert(Assert.java:19)
at junit.framework.Assert.assert(Assert.java:26)
at 
org.jboss.test.lock.test.EnterpriseEntityTest.run(EnterpriseEntityTest.java:112)
at 
org.jboss.test.lock.test.EnterpriseEntityTest.testB2B(EnterpriseEntityTest.java:156)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:155)
at junit.framework.TestCase.runBare(TestCase.java:129)
at junit.framework.TestResult$1.protect(TestResult.java:100)
at junit.framework.TestResult.runProtected(TestResult.java:117)
at junit.framework.TestResult.run(TestResult.java:103)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.run(TestSuite.java:144)
at junit.framework.TestSuite.run(TestSuite.java:144)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:209)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:342)

-



Suite:   org.jboss.test.jmsra.test.AllJUnitTests
Test:testBeanOk
Type:failure
Exception:   junit.framework.AssertionFailedError
Message: expected:<3> but was:<-1>
Stack Trace:
junit.framework.AssertionFailedError: expected:<3> but was:<-1>
at junit.framework.Assert.fail(Assert.java:143)
at junit.framework.Assert.failNotEquals(Assert.java:149)
at junit.framework.Assert.assertEquals(Assert.java:86)
at junit.framework.Assert.assertEquals(Assert.java:72)
at junit.framework.Assert.assertEquals(Assert.java:43)
at org.jboss.test.jmsra.test.RaTest.testBeanOk(RaTest.java:175)
at java.lang.reflect.Method.invoke(Native Method)
at junit.framework.TestCase.runTest(TestCase.java:155)
at junit.framework.TestCase.runBare(TestCase.java:129)
at junit.framework.TestResult$1.protect(TestResult.java:100)
at junit.framework.TestResult.runProtected(TestResult.java:117)
at junit.framework.TestResult.run(TestResult.java:103)
at junit.framework.TestCase.run(TestCase.java:120)
at junit.framework.TestSuite.run(TestSuite.java:144)
at junit.framework.TestSuite.run(TestSuite.java:144)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:209)
at 
org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:342)

-



Suite:   org.jboss.test.jmsra.test.AllJUnitTests
Test:testSimple
Type:failure
Exception:   junit.framework.AssertionFailedError
Message: expected:<1> but was:<-1>
Stack Trace:
junit.framework.AssertionFailedError: expected:<1> but was:<-1>
  

Re: [JBoss-dev] EntityInstanceInterceptor change

2001-07-12 Thread Jason Dillon

I am not sure what you think is interesting, but from time to time, when
large jobs are being processed and I end up with a hang I see this every
time (note that the line numbers are off by one... but that is not the
interesting bit):


Full thread dump Classic VM (1.3.1-b24, green threads):
"RMI TCP Connection(42)-127.0.0.1" (TID:0x4143d208,
sys_thread_t:0x9144730, state:CW) prio=5
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:420)
at
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterceptor.java:183)
at
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:97)
at
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:153)
at
org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:62)
at
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:127)
at
org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:373)
at
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:360)
at java.lang.reflect.Method.invoke(Native Method)
at
sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
at sun.rmi.transport.Transport$1.run(Transport.java:152)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:706)
at java.lang.Thread.run(Thread.java:484)


on the MDB side I get things like this:

JMXAdaptorService [Thread-12] WARN  - Transaction XidImpl [FormatId=257,
GlobalId=reason//48, BranchQual=] timed out. status=STATUS_ACTIVE

and on the spooler side I get:

Customer [Thread-20] WARN  - Transaction XidImpl [FormatId=257,
GlobalId=reason//158, BranchQual=] timed out. status=STATUS_COMMITING
Customer [Thread-21] WARN  - Transaction XidImpl [FormatId=257,
GlobalId=reason//159, BranchQual=] timed out. status=STATUS_ACTIVE

This is very, very weird, because the Customer entity is only used very
early on in the process.  At other times I will get the same with a
Stateless session that controls the clients interation (via the web proxy).

*sigh*

I guess the only thing that I can really do here, is try and make a test to
reproduce this.  I am still learning how the internals of the container
work, which is driving me a bit loony at the moment (topped off by a large
pill of stress and a dab of desperation).

--jason


On Wed, 11 Jul 2001, Scott M Stark wrote:

> Alright. Like I said the best starting point is a thread dump of the VM that
> appears to be hanging. Post it if you get one that looks interesting.
>
> - Original Message -
> From: "Jason Dillon" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 11, 2001 10:47 PM
> Subject: Re: [JBoss-dev] EntityInstanceInterceptor change
>
>
> > It is complicated.
> >
>
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



Re: [JBoss-dev] EntityInstanceInterceptor change

2001-07-12 Thread Scott M Stark

That is interesting. It shows the context waiting to be notified for a
transaction
conflict to resolve. I have found the problem with the NPE that is showing
up in
the bank unit test and in the process I see some problems with how the
context
transaction is being handled. This is a piece that Marc just totally rewrote
and it
still has some bugs in it.

Send me the full thread dump directly to me so I can see if it shows anyone
holding
the monitor. Send it to [EMAIL PROTECTED]

- Original Message -
From: "Jason Dillon" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 12, 2001 7:04 PM
Subject: Re: [JBoss-dev] EntityInstanceInterceptor change


> I am not sure what you think is interesting, but from time to time, when
> large jobs are being processed and I end up with a hang I see this every
> time (note that the line numbers are off by one... but that is not the
> interesting bit):
>
> 
> Full thread dump Classic VM (1.3.1-b24, green threads):
> "RMI TCP Connection(42)-127.0.0.1" (TID:0x4143d208,
> sys_thread_t:0x9144730, state:CW) prio=5
> at java.lang.Object.wait(Native Method)
> at java.lang.Object.wait(Object.java:420)
> at
>
org.jboss.ejb.plugins.EntityInstanceInterceptor.invoke(EntityInstanceInterce
ptor.java:183)
> at
>
org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor
.java:97)
> at
>
org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.
java:153)
> at
> org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:62)
> at
>
org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:12
7)
> at
> org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
> at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:373)
> at
>
org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerI
nvoker.java:360)
> at java.lang.reflect.Method.invoke(Native Method)
> at
> sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
> at sun.rmi.transport.Transport$1.run(Transport.java:152)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.rmi.transport.Transport.serviceCall(Transport.java:148)
> at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:465)
> at
>
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:7
06)
> at java.lang.Thread.run(Thread.java:484)
> 
>
> on the MDB side I get things like this:
>
> JMXAdaptorService [Thread-12] WARN  - Transaction XidImpl [FormatId=257,
> GlobalId=reason//48, BranchQual=] timed out. status=STATUS_ACTIVE
>
> and on the spooler side I get:
>
> Customer [Thread-20] WARN  - Transaction XidImpl [FormatId=257,
> GlobalId=reason//158, BranchQual=] timed out. status=STATUS_COMMITING
> Customer [Thread-21] WARN  - Transaction XidImpl [FormatId=257,
> GlobalId=reason//159, BranchQual=] timed out. status=STATUS_ACTIVE
>
> This is very, very weird, because the Customer entity is only used very
> early on in the process.  At other times I will get the same with a
> Stateless session that controls the clients interation (via the web
proxy).
>
> *sigh*
>
> I guess the only thing that I can really do here, is try and make a test
to
> reproduce this.  I am still learning how the internals of the container
> work, which is driving me a bit loony at the moment (topped off by a large
> pill of stress and a dab of desperation).
>
> --jason
>
>
> On Wed, 11 Jul 2001, Scott M Stark wrote:
>
> > Alright. Like I said the best starting point is a thread dump of the VM
that
> > appears to be hanging. Post it if you get one that looks interesting.
> >
> > - Original Message -
> > From: "Jason Dillon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 11, 2001 10:47 PM
> > Subject: Re: [JBoss-dev] EntityInstanceInterceptor change
> >
> >
> > > It is complicated.
> > >
> >
> >
> >
> > ___
> > Jboss-development mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-development
> >
>
>
> ___
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb EntityPersistenceStore.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 20:25:54

  Modified:src/main/org/jboss/ejb EntityPersistenceStore.java
  Log:
   o re-indent & clean up javadocs
  
  Revision  ChangesPath
  1.6   +127 -112  jboss/src/main/org/jboss/ejb/EntityPersistenceStore.java
  
  Index: EntityPersistenceStore.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityPersistenceStore.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EntityPersistenceStore.java   2001/06/18 20:01:21 1.5
  +++ EntityPersistenceStore.java   2001/07/13 03:25:54 1.6
  @@ -8,10 +8,7 @@
   
   import java.lang.reflect.Method;
   import java.rmi.RemoteException;
  -import java.util.Collection;
  -import java.util.Map;
   
  -import javax.ejb.CreateException;
   import javax.ejb.FinderException;
   import javax.ejb.RemoveException;
   
  @@ -19,96 +16,108 @@
   import org.jboss.util.FinderResults;
   
   /**
  - *   This interface is implemented by any EntityBean persistence Store.
  + * This interface is implemented by any EntityBean persistence Store.
*
  - *  These stores just deal with the persistence aspect of storing java objects
  - *  They need not be aware of the EJB semantics.
  - *
  - *  They act as delegatees for the CMPEntityPersistenceManager class.
  + * These stores just deal with the persistence aspect of storing java 
  + *objects. They need not be aware of the EJB semantics.  They act as
  + *delegatees for the CMPEntityPersistenceManager class.
  + * 
  + * @see EntityPersistenceManager
* 
  - *   @see EntityPersistenceManager
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
* @author mailto:[EMAIL PROTECTED]";>Marc Fleury
* @author mailto:[EMAIL PROTECTED]";>Simone Bordet
  - *   @version $Revision: 1.5 $
  + * @version $Revision: 1.6 $
*/
   public interface EntityPersistenceStore
  -extends ContainerPlugin
  +   extends ContainerPlugin
   {
  -   // Public 
  -
  - /**
  -  *  This method is called whenever an entity is to be created. The 
persistence manager
  -  *  is responsible for handling the results properly wrt the persistent 
store.
  -  *
  -  *  The return is 
  -  *  The primary key in case of CMP PM
  -  *  Null in case of BMP PM (but no store should exist)
  -  *
  -  * @param   m  the create method in the home interface that was called
  -  * @param   args  any create parameters
  -  * @param   instance  the instance being used for this create call
  -  * @return  Object, the primary key computed by CMP PM or null for BMP
  -  * @exception   Exception  
  -  */
  -   public Object createEntity(Method m, Object[] args, EntityEnterpriseContext 
instance)
  +   /**
  +* This method is called whenever an entity is to be created.
  +* The persistence manager is responsible for handling the results properly
  +* wrt the persistent store.
  +*
  +* @param m   the create method in the home interface that was
  +*called
  +* @param argsany create parameters
  +* @param instancethe instance being used for this create call
  +* @returnThe primary key computed by CMP PM or null for BMP
  +* 
  +* @throws Exception  
  +*/
  +   Object createEntity(Method m,
  +   Object[] args,
  +   EntityEnterpriseContext instance)
 throws Exception;
   
  - /**
  -  *  This method is called when single entities are to be found. The 
persistence manager must find out
  -  *  whether the wanted instance is available in the persistence store, if 
so it returns
  -  *  the primary key of the object.
  -  *
  -  * @param   finderMethod  the find method in the home interface that was called
  -  * @param   args  any finder parameters
  -  * @param   instance  the instance to use for the finder call
  -  * @return a primary key representing the found entity
  -  * @exception   RemoteException  thrown if some system exception occurs
  -  * @exception   FinderException  thrown if some heuristic problem occurs
  -  */
  -   public Object findEntity(Method finderMethod, Object[] args, 
EntityEnterpriseContext instance)
  +   /**
  +* This method is called when single entities are to be found. The
  +* persistence manager must find out whether the wanted instance is
  +* available in the persistence store, if so it returns the primary key of
  +* the object.
  +*
  +* @param finderMethodthe find method in the home interface that was
  +*called
  +* @param argsany finder parameters
  +* @param instancethe instance to use 

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb EntityPersistenceStore2.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 20:27:21

  Modified:src/main/org/jboss/ejb EntityPersistenceStore2.java
  Log:
   o re-indent & cleanup javadoc
  
  Revision  ChangesPath
  1.2   +27 -12jboss/src/main/org/jboss/ejb/EntityPersistenceStore2.java
  
  Index: EntityPersistenceStore2.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityPersistenceStore2.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntityPersistenceStore2.java  2001/06/24 03:02:37 1.1
  +++ EntityPersistenceStore2.java  2001/07/13 03:27:21 1.2
  @@ -8,19 +8,34 @@
   
   import java.rmi.RemoteException;
   
  -public interface EntityPersistenceStore2 extends EntityPersistenceStore {
  - /**
  - * Returns a new instance of the bean class or a subclass of the bean class.
  - * 
  - * @return the new instance
  - */
  - public Object createBeanClassInstance() throws Exception;
  +/**
  + * ???
  + *
  + * @author Unknown
  + * @version $Revision: 1.2 $
  + */
  +public interface EntityPersistenceStore2
  +   extends EntityPersistenceStore
  +{
  +   /**
  +* Returns a new instance of the bean class or a subclass of the bean class.
  +* 
  +* @return   the new instance
  +*
  +* @throws Exception
  +*/
  +   public Object createBeanClassInstance() throws Exception;
   
  - /**
  - * Initializes the instance context.
  - * This method is called before createEntity, and should
  - * reset the value of all cmpFields to 0 or null. 
  - */
  +   /**
  +* Initializes the instance context.
  +* 
  +* This method is called before createEntity, and should
  +*reset the value of all cmpFields to 0 or null.
  +*
  +* @param ctx
  +* 
  +* @throws RemoteException
  +*/
  public void initEntity(EntityEnterpriseContext ctx) throws RemoteException;
   }
   
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb EntityPersistenceManager.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 20:18:51

  Modified:src/main/org/jboss/ejb EntityPersistenceManager.java
  Log:
   o re-indent & clean up javadocs
  
  Revision  ChangesPath
  1.8   +113 -98   jboss/src/main/org/jboss/ejb/EntityPersistenceManager.java
  
  Index: EntityPersistenceManager.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityPersistenceManager.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- EntityPersistenceManager.java 2001/06/24 03:06:45 1.7
  +++ EntityPersistenceManager.java 2001/07/13 03:18:51 1.8
  @@ -10,127 +10,142 @@
   import java.rmi.RemoteException;
   import java.util.Collection;
   
  -import javax.ejb.CreateException;
  -import javax.ejb.FinderException;
   import javax.ejb.RemoveException;
   
  -import org.jboss.util.FinderResults;
  -
   /**
  - *   This interface is implemented by any EntityBean persistence managers plugins.
  - *
  - *   Implementations of this interface are called by other plugins in the container.
  + * This interface is implemented by any EntityBean persistence managers
  + * plugins.
*
  - *   If the persistence manager wants to, it may attach any instance specific 
metadata
  - *   to the EntityEnterpriseContext that is passed in method calls.
  + * Implementations of this interface are called by other plugins in the
  + *container.  If the persistence manager wants to, it may attach any
  + *instance specific metadata to the EntityEnterpriseContext that is
  + *passed in method calls.
*
  - *   @see EntityContainer
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @version $Revision: 1.7 $
  + * @see EntityContainer
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @version $Revision: 1.8 $
*/
   public interface EntityPersistenceManager
  extends ContainerPlugin
   {
  -   // Public 
  -
  - /**
  - * Returns a new instance of the bean class or a subclass of the bean class.
  - * 
  - * @return the new instance
  - */
  - public Object createBeanClassInstance() throws Exception;
  -
  - /**
  -  *  This method is called whenever an entity is to be created. The 
persistence manager
  -  *  is responsible for calling the ejbCreate methods on the instance and 
to handle the results
  -  *  properly wrt the persistent store.
  -  *
  -  * @param   m  the create method in the home interface that was called
  -  * @param   args  any create parameters
  -  * @param   instance  the instance being used for this create call
  -  */
  -   public void createEntity(Method m, Object[] args, EntityEnterpriseContext 
instance)
  +   /**
  +* Returns a new instance of the bean class or a subclass of the bean class.
  +* 
  +* @return the new instance
  +*/
  +   Object createBeanClassInstance() throws Exception;
  +
  +   /**
  +* This method is called whenever an entity is to be created. The
  +* persistence manager is responsible for calling the ejbCreate methods
  +* on the instance and to handle the results properly wrt the persistent
  +* store.
  +*
  +* @param m   the create method in the home interface that was
  +*called
  +* @param argsany create parameters
  +* @param instancethe instance being used for this create call
  +*/
  +   void createEntity(Method m,
  + Object[] args,
  + EntityEnterpriseContext instance)
 throws Exception;
   
  - /**
  -  *  This method is called when single entities are to be found. The 
persistence manager must find out
  -  *  whether the wanted instance is available in the persistence store, and 
if so it shall use the ContainerInvoker
  -  *  plugin to create an EJBObject to the instance, which is to be returned 
as result.
  -  *
  -  * @param   finderMethod  the find method in the home interface that was called
  -  * @param   args  any finder parameters
  -  * @param   instance  the instance to use for the finder call
  -  * @return an EJBObject representing the found entity
  -  */
  -   public Object findEntity(Method finderMethod, Object[] args, 
EntityEnterpriseContext instance)
  +   /**
  +* This method is called when single entities are to be found. The
  +* persistence manager must find out whether the wanted instance is
  +* available in the persistence store, and if so it shall use the
  +* ContainerInvoker plugin to create an EJBObject to the instance, which
  +* is to be returned as result.
  +*
  +* @param finderMethodthe find method in the home interface that was
  +*called
  +* @param argsany fi

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb LocalContainerInvoker.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 20:29:44

  Modified:src/main/org/jboss/ejb LocalContainerInvoker.java
  Log:
   o cleaned up
  
  Revision  ChangesPath
  1.4   +51 -53jboss/src/main/org/jboss/ejb/LocalContainerInvoker.java
  
  Index: LocalContainerInvoker.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/LocalContainerInvoker.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LocalContainerInvoker.java2001/06/18 20:01:21 1.3
  +++ LocalContainerInvoker.java2001/07/13 03:29:44 1.4
  @@ -12,64 +12,62 @@
   import javax.ejb.EJBLocalObject;
   
   /**
  - *   This is an extension to the ContainerInvoker interface. Although some
  - *  implementations of the ContainerInvoker interface may provide access
  - *  to local interfaces, others (e.g. which provide remote distribution)
  - *  will not. Good example: the JRMP delegates do not need to implement
  - *  this interface.
  + * This is an extension to the ContainerInvoker interface. Although some
  + * implementations of the ContainerInvoker interface may provide access
  + * to local interfaces, others (e.g. which provide remote distribution)
  + * will not. Good example: the JRMP delegates do not need to implement
  + * this interface.
*
  - *   @see ContainerInvoker
  - *   @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @see ContainerInvoker
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @version $Revision: 1.4 $
*/
   public interface LocalContainerInvoker
  extends ContainerPlugin
   {
  -   // Public 
  -
  - /**
  -  *  This method is called whenever the EJBLocalHome implementation for this
  -  *  container is needed.
  -  *
  -  * @return an implementation of the local home interface for this container
  -  */
  -   public EJBLocalHome getEJBLocalHome();
  -
  -/**
  -  *  This method is called whenever an EJBLocalObject implementation for a 
stateless
  -  *  session bean is needed.
  -  *
  -  * @return an implementation of the local interface for this container
  -  */
  -   public EJBLocalObject getStatelessSessionEJBLocalObject();
  -
  - /**
  -  *  This method is called whenever an EJBLocalObject implementation for a 
stateful
  -  *  session bean is needed.
  -  *
  -  * @param   id  the id of the session
  -  * @return an implementation of the local interface for this container
  -  */
  -   public EJBLocalObject getStatefulSessionEJBLocalObject(Object id);
  +   /**
  +* This method is called whenever the EJBLocalHome implementation for this
  +* container is needed.
  +*
  +* @returnan implementation of the local home interface for this
  +*container
  +*/
  +   EJBLocalHome getEJBLocalHome();
  +
  +   /**
  +* This method is called whenever an EJBLocalObject implementation for a
  +* stateless session bean is needed.
  +*
  +* @returnan implementation of the local interface for this container
  +*/
  +   EJBLocalObject getStatelessSessionEJBLocalObject();
  +
  +   /**
  +* This method is called whenever an EJBLocalObject implementation for a
  +* stateful session bean is needed.
  +*
  +* @param idthe id of the session
  +* @return   an implementation of the local interface for this container
  +*/
  +   EJBLocalObject getStatefulSessionEJBLocalObject(Object id);
 
  - /**
  -  *  This method is called whenever an EJBLocalObject implementation for an 
entitybean
  -  * is needed.
  -  *
  -  * @param   id  the primary key of the entity
  -  * @return an implementation of the local interface for this container
  -  */
  -   public EJBLocalObject getEntityEJBLocalObject(Object id);
  - /**
  -  *  This method is called whenever a collection of EJBLocalObjects for a 
collection of primary keys
  -  * is needed.
  -  *
  -  * @param   enum  enumeration of primary keys
  -  * @return a collection of EJBLocalObjects implementing the remote 
interface for this container
  -  */
  -   public Collection getEntityLocalCollection(Collection enum);
  +   /**
  +* This method is called whenever an EJBLocalObject implementation for an
  +* entitybean is needed.
  +*
  +* @param idthe primary key of the entity
  +* @return  an implementation of the local interface for this container
  +*/
  +   EJBLocalObject getEntityEJBLocalObject(Object id);
  
  +   /**
  +* This method is called whenever a collection of EJBLocalObjects for a
  +* collection of primary keys is needed.
  +*
  +* @param enumenumeration of primary keys
  +* @return  

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb LocalHomeObjectFactory.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 20:34:40

  Modified:src/main/org/jboss/ejb LocalHomeObjectFactory.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.3   +88 -71jboss/src/main/org/jboss/ejb/LocalHomeObjectFactory.java
  
  Index: LocalHomeObjectFactory.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/LocalHomeObjectFactory.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LocalHomeObjectFactory.java   2001/06/18 20:01:21 1.2
  +++ LocalHomeObjectFactory.java   2001/07/13 03:34:40 1.3
  @@ -20,83 +20,100 @@
   import javax.naming.StringRefAddr;
   import javax.naming.spi.ObjectFactory;
   
  -/** Based on Scott Stark's NonSerializableObjectFactory:
  +/**
  + * Based on Scott Stark's NonSerializableObjectFactory
*
  - *  @author mailto:[EMAIL PROTECTED]";>Scott Stark.
  - *  @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @author mailto:[EMAIL PROTECTED]";>Scott Stark.
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @version $Revision: 1.3 $
*/
  -public class LocalHomeObjectFactory implements ObjectFactory
  +public class LocalHomeObjectFactory
  +   implements ObjectFactory
   {
  -private static Map applicationMap = Collections.synchronizedMap(new HashMap());
  -private static Map containerMap = Collections.synchronizedMap(new HashMap());
  -
  -
  -/** Place an object into the NonSerializableFactory namespace for subsequent
  -access by getObject.
  -
  -@param key, the name to bind target under. This should typically be the
  -name that will be used to bind target in the JNDI namespace, but it does
  -not have to be.
  -@param target, the non-Serializable object to bind.
  +   private static Map applicationMap =
  +  Collections.synchronizedMap(new HashMap());
  +   
  +   private static Map containerMap =
  +  Collections.synchronizedMap(new HashMap());
  +
  +   /**
  +* Place an object into the NonSerializableFactory namespace for subsequent
  +* access by getObject.
  +*
  +* @param key   the name to bind target under. This should typically 
  +*  be the name that will be used to bind target in the 
  +*  JNDI namespace, but it does not have to be.
  +* @param targetthe non-Serializable object to bind.
   */
  -public static synchronized void rebind(String key, Application application,
  -  Container container )
  -{
  -applicationMap.put(key, application);
  -containerMap.put( key, container ); 
  -}
  -/** Place or replace an object in the NonSerializableFactory namespce
  - for subsequent access by getObject. Any existing binding for key will be
  - replaced by target.
  -
  -/** Remove a binding from the NonSerializableFactory map.
  -
  -@param key, the key into the NonSerializableFactory map to remove.
  -@param target, the non-Serializable object to bind.
  -@throws NameNotFoundException, thrown if key does not exist in the
  - NonSerializableFactory map
  +   public static synchronized void rebind(String key,
  +  Application application,
  +  Container container)
  +   {
  +  applicationMap.put(key, application);
  +  containerMap.put(key, container); 
  +   }
  +   
  +   /**
  +* Place or replace an object in the NonSerializableFactory namespce
  +* for subsequent access by getObject. Any existing binding for key will be
  +* replaced by target.
  +*
  +* Remove a binding from the NonSerializableFactory map.
  +*
  +* @param key   the key into the NonSerializableFactory map to remove.
  +* @param targetthe non-Serializable object to bind.
  +* 
  +* @throws NameNotFoundExceptionthrown if key does not exist in the
  +*  NonSerializableFactory map
   */
  -public static void unbind(String key) throws NameNotFoundException
  -{
  -if( applicationMap.remove(key) == null )
  -throw new NameNotFoundException(key+" was not found in the 
NonSerializableFactory map");
  -containerMap.remove(key);
  -}
  -
  -/** Lookup a value from the NonSerializableFactory map.
  -@return the object bound to key is one exists, null otherwise.
  +   public static void unbind(String key) throws NameNotFoundException
  +   {
  +  if( applicationMap.remove(key) == null )
  + throw new NameNotFoundException
  +(key+" was not found in the NonSerializableFactory map");
  +  containerMap.remove(key);
  +   }
  +
  +   /**
  +* Lookup a value from the NonSerializableFactory map.
  +* 
  +* @return   the object bound to key is one exists, null otherwise.
   */
  -public static Object lookup(S

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb MessageDrivenEnterpriseContext.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 20:39:02

  Modified:src/main/org/jboss/ejb MessageDrivenEnterpriseContext.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.7   +79 -76jboss/src/main/org/jboss/ejb/MessageDrivenEnterpriseContext.java
  
  Index: MessageDrivenEnterpriseContext.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/MessageDrivenEnterpriseContext.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MessageDrivenEnterpriseContext.java   2001/06/21 05:14:31 1.6
  +++ MessageDrivenEnterpriseContext.java   2001/07/13 03:39:02 1.7
  @@ -8,15 +8,11 @@
   
   import java.lang.reflect.Method;
   import java.lang.reflect.InvocationTargetException;
  -import java.lang.IllegalStateException;
   
   import java.security.Principal;
   
   import java.rmi.RemoteException;
  -import java.rmi.ServerException;
   
  -import javax.transaction.UserTransaction;
  -
   import javax.ejb.EJBContext;
   import javax.ejb.EJBHome;
   import javax.ejb.EJBObject;
  @@ -32,13 +28,11 @@
   /**
* Context for message driven beans, based on Stateless.
* FIXME - not yet verified agains spec!!!
  - *
*  
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Peter Antman.
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *  @author Sebastien Alborini
  - *   @version $Revision: 1.6 $
  + * @author mailto:[EMAIL PROTECTED]";>Peter Antman.
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author Sebastien Alborini
  + * @version $Revision: 1.7 $
*/
   public class MessageDrivenEnterpriseContext
  extends EnterpriseContext
  @@ -46,74 +40,83 @@
  // Constants -
   
  // Attributes 
  -//EJBObject ejbObject;
  +
  +   //EJBObject ejbObject;
  MessageDrivenContext ctx;
  
  // Static 
  
  // Constructors --
  +   
  public MessageDrivenEnterpriseContext(Object instance, Container con)
 throws Exception
  {
 super(instance, con);
 ctx = new MessageDrivenContextImpl();
  
  -   ((MessageDrivenBean)instance).setMessageDrivenContext(ctx);
  +  ((MessageDrivenBean)instance).setMessageDrivenContext(ctx);
 
 try
 {
  - Method ejbCreate = instance.getClass().getMethod("ejbCreate", new 
Class[0]);
  + Method ejbCreate = instance.getClass().getMethod("ejbCreate",
  +  new Class[0]);
ejbCreate.invoke(instance, new Object[0]);
 } catch (InvocationTargetException e) 
 {
  -  Throwable ex = e.getTargetException();
  -  if (ex instanceof EJBException)
  - throw (Exception)ex;
  -  else if (ex instanceof RuntimeException)
  - throw new EJBException((Exception)ex); // Transform runtime exception 
into what a bean *should* have thrown
  -  else if (ex instanceof Exception)
  - throw (Exception)ex;
  -  else
  - throw (Error)ex;
  + Throwable ex = e.getTargetException();
  + if (ex instanceof EJBException)
  +throw (Exception)ex;
  + else if (ex instanceof RuntimeException)
  +// Transform runtime exception into what a bean *should*
  +// have thrown
  +throw new EJBException((Exception)ex); 
  + else if (ex instanceof Exception)
  +throw (Exception)ex;
  + else
  +throw (Error)ex;
 }
  }
  
  // Public 
  -// FIXME
  -// Here we have some problems. If we are to use the Stateless stuff,
  -// should we inherit from StatelessSessionEnterpriseContext or what?
  -
  -public void setEJBObject(EJBObject eo) { 
  -  throw new Error("Not applicatable for MessageDrivenContext");
  - //NOOP
  - //ejbObject = eo; 
  -}
  +
  +   // FIXME
  +   // Here we have some problems. If we are to use the Stateless stuff,
  +   // should we inherit from StatelessSessionEnterpriseContext or what?
  +
  +   public void setEJBObject(EJBObject eo) { 
  +  throw new Error("Not applicatable for MessageDrivenContext");
  +  //NOOP
  +  //ejbObject = eo; 
  +   }
  +   
  public EJBObject getEJBObject() { 
  -   throw new Error("Not applicatable for MessageDrivenContext");
  -   //return ejbObject; 
  +  throw new Error("Not applicatable for MessageDrivenContext");
  +  //return ejbObject; 
  }
  -// This is used at least in The pool, created there even!!!
  -// and in interceptors, ugh
  +   
  +   // This is used at least 

[JBoss-dev] why is StatefulSessionEnterpriseContext Serializable

2001-07-12 Thread Jason Dillon

It is the only context that implement java.io.Serializable.  It also
overrides Object() with nothing.  Just curious.

--jason


___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb TxEntityMap.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:05:47

  Modified:src/main/org/jboss/ejb TxEntityMap.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.2   +62 -53jboss/src/main/org/jboss/ejb/TxEntityMap.java
  
  Index: TxEntityMap.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/TxEntityMap.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TxEntityMap.java  2001/06/15 03:37:29 1.1
  +++ TxEntityMap.java  2001/07/13 04:05:47 1.2
  @@ -1,66 +1,75 @@
  +/*
  + * JBoss, the OpenSource EJB server
  + *
  + * Distributable under LGPL license.
  + * See terms of license at gnu.org.
  + */
   package org.jboss.ejb;
   
   import java.util.HashMap;
   import javax.transaction.Transaction;
   
   /**
  - * This class provides a way to find out what entities
  - * are contained in what transaction.  It is used, to find which entities 
  - * to call ejbStore() on when a ejbFind() method is called within a transaction. 
EJB 2.0- 9.6.4
  - * Used in EntitySynchronizationInterceptor
  - *   @author Bill Burke
  - *   @version $Revision: 1.1 $
  + * This class provides a way to find out what entities are contained in
  + * what transaction.  It is used, to find which entities to call ejbStore()
  + * on when a ejbFind() method is called within a transaction. EJB 2.0- 9.6.4
  + * Used in EntitySynchronizationInterceptor.
  + * 
  + * @author Bill Burke
  + * @version $Revision: 1.2 $
*/
   public class TxEntityMap
   {
  -protected HashMap m_map = new HashMap();
  +   protected HashMap m_map = new HashMap();
   
  -/**
  - * associate entity with transaction
  - */
  -public synchronized void associate(Transaction tx, EntityEnterpriseContext 
entity)
  -{
  - HashMap entityMap = (HashMap)m_map.get(tx);
  - if (entityMap == null)
  - {
  - entityMap = new HashMap();
  - m_map.put(tx, entityMap);
  - }
  - entityMap.put(entity.getCacheKey(), entity);
  -}
  +   /**
  +* associate entity with transaction
  +*/
  +   public synchronized void associate(Transaction tx,
  +  EntityEnterpriseContext entity)
  +   {
  +  HashMap entityMap = (HashMap)m_map.get(tx);
  +  if (entityMap == null)
  +  {
  + entityMap = new HashMap();
  + m_map.put(tx, entityMap);
  +  }
  +  entityMap.put(entity.getCacheKey(), entity);
  +   }
   
  -/**
  - * disassociate entity with transaction.  When the transaction has no more 
entities.
  - * it is removed from this class's internal HashMap.
  - */
  -public synchronized void disassociate(Transaction tx, EntityEnterpriseContext 
ctx)
  -{
  - HashMap entityMap = (HashMap)m_map.get(tx);
  - if (entityMap == null)
  - {
  - return;
  - }
  - entityMap.remove(ctx.getCacheKey());
  - // When all entities are gone, cleanup!
  - // cleanup involves removing the transaction
  - // from the map
  - if (entityMap.size() <= 0)
  - {
  - m_map.remove(tx);
  - }
  -}
  +   /**
  +* Disassociate entity with transaction.  When the transaction has no
  +* more entities.  it is removed from this class's internal HashMap.
  +*/
  +   public synchronized void disassociate(Transaction tx,
  + EntityEnterpriseContext ctx)
  +   {
  +  HashMap entityMap = (HashMap)m_map.get(tx);
  +  if (entityMap == null)
  +  {
  + return;
  +  }
  +  entityMap.remove(ctx.getCacheKey());
  +  
  +  // When all entities are gone, cleanup!
  +  // cleanup involves removing the transaction
  +  // from the map
  +  if (entityMap.size() <= 0)
  +  {
  + m_map.remove(tx);
  +  }
  +   }

  -/**
  - * get all EntityEnterpriseContext that are involved with a transaction.
  - */
  -public synchronized Object[] getEntities(Transaction tx)
  -{
  - HashMap entityMap = (HashMap)m_map.get(tx);
  - if (entityMap == null) // there are no entities associated
  - {
  - return new Object[0];
  - }
  - return entityMap.values().toArray();
  -}
  -
  +   /**
  +* get all EntityEnterpriseContext that are involved with a transaction.
  +*/
  +   public synchronized Object[] getEntities(Transaction tx)
  +   {
  +  HashMap entityMap = (HashMap)m_map.get(tx);
  +  if (entityMap == null) // there are no entities associated
  +  {
  + return new Object[0];
  +  }
  +  return entityMap.values().toArray();
  +   }
   }
  
  
  

___
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development



[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb StatefulSessionContainer.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:06:24

  Modified:src/main/org/jboss/ejb StatefulSessionContainer.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.30  +326 -298  jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java
  
  Index: StatefulSessionContainer.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- StatefulSessionContainer.java 2001/07/04 22:44:46 1.29
  +++ StatefulSessionContainer.java 2001/07/13 04:06:24 1.30
  @@ -14,6 +14,7 @@
   import java.util.Enumeration;
   import java.util.Collection;
   import java.util.ArrayList;
  +import java.rmi.RemoteException;
   
   import javax.ejb.Handle;
   import javax.ejb.HomeHandle;
  @@ -30,51 +31,62 @@
   import org.jboss.logging.Logger;
   
   /**
  - *
  + * The container for stateful session beans.
*  
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *   @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  - *   @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  - *   @version $Revision: 1.29 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  + * @version $Revision: 1.30 $
*
  - *   Revisions
  - *   20010704
  - *   
  - *   - Throw an exception when removing a bean in transaction (in remove)? (I 
dissagree)
  - *   
  + * Revisions
  + * 20010704
  + * 
  + * Throw an exception when removing a bean in transaction (in remove)?
  + * (I dissagree)
  + * 
*/
   public class StatefulSessionContainer
  extends Container
  -implements ContainerInvokerContainer, InstancePoolContainer
  +   implements ContainerInvokerContainer, InstancePoolContainer
   {
  // Constants -
   
  // Attributes 
  -   // This is the Home interface class
  +
  +   /** This is the Home interface class */
  protected Class homeInterface;
   
  -   // This is the Remote interface class
  +   /** This is the Remote interface class */
  protected Class remoteInterface;
   
  -   // These are the mappings between the home interface methods and the container 
methods
  +   /**
  +* These are the mappings between the home interface methods and the
  +* container methods.
  +*/
  protected Map homeMapping;
  
  -   // These are the mappings between the remote interface methods and the bean 
methods
  +   /**
  +* These are the mappings between the remote interface methods and the
  +* bean methods.
  +*/
  protected Map beanMapping;
  
  -   // This is the container invoker for this container
  +   /** This is the container invoker for this container */
  protected ContainerInvoker containerInvoker;
  
  -   // This is the first interceptor in the chain. The last interceptor must be 
provided by the container itself
  +   /**
  +* This is the first interceptor in the chain. The last interceptor must
  +* be provided by the container itself.
  +*/
  protected Interceptor interceptor;
   
  -   // This is the instancepool that is to be used
  +   /** This is the instancepool that is to be used */
  protected InstancePool instancePool;
   
  -   // This is the persistence manager for this container
  +   /** This is the persistence manager for this container */
  protected StatefulSessionPersistenceManager persistenceManager;
  -
  +
  +   /** The instance cache. */
  protected InstanceCache instanceCache;
  
  // Static 
  @@ -82,10 +94,11 @@
  // Constructors --
  
  // Public 
  +   
  public void setContainerInvoker(ContainerInvoker ci) 
  { 
 if (ci == null) 
  -throw new IllegalArgumentException("Null invoker");
  + throw new IllegalArgumentException("Null invoker");
   
 this.containerInvoker = ci; 
 ci.setContainer(this);
  @@ -93,13 +106,13 @@
   
  public ContainerInvoker getContainerInvoker() 
  { 
  -return containerInvoker; 
  +  return containerInvoker; 
  }
  
  -public LocalContainerInvoker getLocalContainerInvoker()
  -{
  -   return localContainerInvoker;
  -}
  +   public LocalContainerInvoker getLocalContainerInvoker()
  +   {
  +  return localContainerInvoker;
  +   }
   
  public void setInstanceCache(InstanceCache ic)
  { 
  @@ -115,7 +128,7 @@
  public void setInstancePool(InstancePool ip) 
  { 
 if (ip == null)
  -throw new IllegalArgument

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb StatefulSessionEnterpriseContext.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:07:51

  Modified:src/main/org/jboss/ejb StatefulSessionEnterpriseContext.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.14  +58 -42
jboss/src/main/org/jboss/ejb/StatefulSessionEnterpriseContext.java
  
  Index: StatefulSessionEnterpriseContext.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatefulSessionEnterpriseContext.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- StatefulSessionEnterpriseContext.java 2001/06/21 05:14:31 1.13
  +++ StatefulSessionEnterpriseContext.java 2001/07/13 04:07:51 1.14
  @@ -7,6 +7,10 @@
   package org.jboss.ejb;
   
   import java.io.IOException;
  +import java.io.Serializable;
  +import java.io.ObjectInputStream;
  +import java.io.ObjectOutputStream;
  +
   import java.rmi.RemoteException;
   
   import javax.ejb.EJBContext;
  @@ -16,93 +20,107 @@
   import javax.ejb.EJBLocalObject;
   import javax.ejb.SessionBean;
   import javax.ejb.SessionContext;
  -
  -import javax.transaction.UserTransaction;
   
  +import org.jboss.logging.Logger;
   import org.jboss.metadata.SessionMetaData;
   
  -
   /**
  - *
  + * The enterprise context for stateful session beans.
*  
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *  @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  - *   @version $Revision: 1.13 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @version $Revision: 1.14 $
*/
   public class StatefulSessionEnterpriseContext
  extends EnterpriseContext
  - implements java.io.Serializable
  +   implements Serializable
   {
  // Constants -
   
  // Attributes 
  +
  private EJBObject ejbObject;
  private EJBLocalObject ejbLocalObject;
  - 
  private SessionContext ctx;
   
  // Static 
  
  // Constructors --
  +   
  public StatefulSessionEnterpriseContext(Object instance, Container con)
 throws RemoteException
  {
 super(instance, con);
  - ctx = new StatefulSessionContextImpl();
  +  ctx = new StatefulSessionContextImpl();
 ((SessionBean)instance).setSessionContext(ctx);
  }
  
  // Public 
  -   public void discard()
  -  throws RemoteException
  +   
  +   public void discard() throws RemoteException
  {
  - // Do nothing
  +  // Do nothing
  }
  +   
  public EJBContext getEJBContext()
  {
  -   return ctx;
  +  return ctx;
  }
   
  -   // During activation of stateful session beans we replace the instance by the 
one read from the file
  +   /**
  +* During activation of stateful session beans we replace the instance
  +* by the one read from the file.
  +*/
  public void setInstance(Object instance) 
  -{ 
  -   this.instance = instance; 
  -try 
  -{
  -   ((SessionBean)instance).setSessionContext(ctx);
  -}
  -catch (Exception x) 
  -{
  -org.jboss.logging.Logger.exception(x);
  -}
  -}
  -   
  -   public void setEJBObject(EJBObject eo) { ejbObject = eo; }
  -   public EJBObject getEJBObject() { return ejbObject; }
  -   public void setEJBLocalObject(EJBLocalObject eo) { ejbLocalObject = eo; }
  -   public EJBLocalObject getEJBLocalObject() { return ejbLocalObject; }
  +   { 
  +  this.instance = instance; 
  +  try 
  +  {
  + ((SessionBean)instance).setSessionContext(ctx);
  +  }
  +  catch (Exception x) 
  +  {
  + Logger.exception(x);
  +  }
  +   }
  +   
  +   public void setEJBObject(EJBObject eo) {
  +  ejbObject = eo;
  +   }
  +   
  +   public EJBObject getEJBObject() {
  +  return ejbObject;
  +   }
  +   
  +   public void setEJBLocalObject(EJBLocalObject eo) {
  +  ejbLocalObject = eo;
  +   }
  +   
  +   public EJBLocalObject getEJBLocalObject() {
  +  return ejbLocalObject;
  +   }

  - public SessionContext getSessionContext()
  - {
  - return ctx;
  - }
  +   public SessionContext getSessionContext()
  +   {
  +  return ctx;
  +   }
   
  // Package protected -
   
  // Protected -
   
  // Private ---
  -   private void writeObject(java.io.ObjectOutputStream out)
  +   
  +   private void writeObject(ObjectOutputStream out)
 throws IOException, ClassNotF

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb StatelessSessionEnterpriseContext.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:08:01

  Modified:src/main/org/jboss/ejb
StatelessSessionEnterpriseContext.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.12  +39 -31
jboss/src/main/org/jboss/ejb/StatelessSessionEnterpriseContext.java
  
  Index: StatelessSessionEnterpriseContext.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatelessSessionEnterpriseContext.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StatelessSessionEnterpriseContext.java2001/06/21 05:14:31 1.11
  +++ StatelessSessionEnterpriseContext.java2001/07/13 04:08:01 1.12
  @@ -9,28 +9,20 @@
   import java.lang.reflect.Method;
   import java.lang.reflect.InvocationTargetException;
   import java.rmi.RemoteException;
  -import java.rmi.ServerException;
   
   import javax.ejb.EJBContext;
  -import javax.ejb.EJBHome;
   import javax.ejb.EJBLocalObject;
   import javax.ejb.EJBObject;
   import javax.ejb.SessionContext;
   import javax.ejb.SessionBean;
   import javax.ejb.EJBException;
   
  -import javax.transaction.UserTransaction;
  -
  -import org.jboss.metadata.SessionMetaData;
  -
  -
   /**
  - *
  + * The enterprise context for stateless session beans.
*  
  - *   @see 
  - *   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  - *  @author Sebastien Alborini
  - *   @version $Revision: 1.11 $
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author Sebastien Alborini
  + * @version $Revision: 1.12 $
*/
   public class StatelessSessionEnterpriseContext
  extends EnterpriseContext
  @@ -38,6 +30,7 @@
  // Constants -
   
  // Attributes 
  +   
  EJBObject ejbObject;
  EJBLocalObject ejbLocalObject;
  SessionContext ctx;
  @@ -45,52 +38,67 @@
  // Static 
  
  // Constructors --
  +   
  public StatelessSessionEnterpriseContext(Object instance, Container con)
 throws Exception
  {
 super(instance, con);
 ctx = new SessionContextImpl();
  -   
  -   ((SessionBean)instance).setSessionContext(ctx);
 
  +  ((SessionBean)instance).setSessionContext(ctx);
  +  
 try
 {
Method ejbCreate = instance.getClass().getMethod("ejbCreate", new 
Class[0]);
ejbCreate.invoke(instance, new Object[0]);
 } catch (InvocationTargetException e) 
 {
  -  Throwable ex = e.getTargetException();
  -  if (ex instanceof EJBException)
  - throw (Exception)ex;
  -  else if (ex instanceof RuntimeException)
  - throw new EJBException((Exception)ex); // Transform runtime exception 
into what a bean *should* have thrown
  -  else if (ex instanceof Exception)
  - throw (Exception)ex;
  -  else
  - throw (Error)ex;
  + Throwable ex = e.getTargetException();
  + if (ex instanceof EJBException)
  +throw (Exception)ex;
  + else if (ex instanceof RuntimeException)
  +throw new EJBException((Exception)ex); // Transform runtime exception 
into what a bean *should* have thrown
  + else if (ex instanceof Exception)
  +throw (Exception)ex;
  + else
  +throw (Error)ex;
 }
  }
  
  // Public 
  -   public void setEJBObject(EJBObject eo) { ejbObject = eo; }
  -   public EJBObject getEJBObject() { return ejbObject; }
  -   public void setEJBLocalObject(EJBLocalObject eo) { ejbLocalObject = eo; }
  -   public EJBLocalObject getEJBLocalObject() { return ejbLocalObject; }
  
  +   public void setEJBObject(EJBObject eo) {
  +  ejbObject = eo;
  +   }
  +   
  +   public EJBObject getEJBObject() {
  +  return ejbObject;
  +   }
  +   
  +   public void setEJBLocalObject(EJBLocalObject eo) {
  +  ejbLocalObject = eo;
  +   }
  +   
  +   public EJBLocalObject getEJBLocalObject() {
  +  return ejbLocalObject;
  +   }
  +   
  public SessionContext getSessionContext() {
  -return ctx;
  +  return ctx;
  }
   
  // EnterpriseContext overrides ---
  -   public void discard()
  -  throws RemoteException
  +   
  +   public void discard() throws RemoteException
  {
 ((SessionBean)instance).ejbRemove();
  }
  +   
  public EJBContext getEJBContext()
  {
 return ctx;
  }
  +   
  // Package protected -
   
  // Protected -
  @@ -98,6 +106,7 @@
  // Private --

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb EntityContainer.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:08:18

  Modified:src/main/org/jboss/ejb EntityContainer.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.45  +172 -165  jboss/src/main/org/jboss/ejb/EntityContainer.java
  
  Index: EntityContainer.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityContainer.java,v
  retrieving revision 1.44
  retrieving revision 1.45
  diff -u -r1.44 -r1.45
  --- EntityContainer.java  2001/07/03 22:54:34 1.44
  +++ EntityContainer.java  2001/07/13 04:08:18 1.45
  @@ -1,13 +1,14 @@
   /*
  -* JBoss, the OpenSource EJB server
  -*
  -* Distributable under LGPL license.
  -* See terms of license at gnu.org.
  -*/
  + * JBoss, the OpenSource EJB server
  + *
  + * Distributable under LGPL license.
  + * See terms of license at gnu.org.
  + */
   package org.jboss.ejb;
   
   import java.lang.reflect.Method;
   import java.lang.reflect.InvocationTargetException;
  +import java.rmi.RemoteException;
   import java.security.Principal;
   import java.util.Map;
   import java.util.HashMap;
  @@ -31,76 +32,84 @@
   import org.jboss.util.SerializableEnumeration;
   
   /**
  -*   This is a Container for EntityBeans (both BMP and CMP).
  -*   
  -*
  -*   @see Container
  -*   @see EntityEnterpriseContext
  -*   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  -*   @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  -*   @author mailto:[EMAIL PROTECTED]";>Sebastien Alborini
  -*   @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  -*   @author Bill Burke
  -*   @version $Revision: 1.44 $
  -*
  -* 
  -*   Revisions:
  -*
  -*   20010701 marc fleury:
  -*   
  -*   Transaction to context wiring was moved to the instance interceptor
  -*   
  -*/
  -
  -
  + * This is a Container for EntityBeans (both BMP and CMP).
  + *   
  + * @see Container
  + * @see EntityEnterpriseContext
  + *   
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  + * @author mailto:[EMAIL PROTECTED]";>Sebastien Alborini
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @author Bill Burke
  + * @version $Revision: 1.45 $
  + *
  + * Revisions:
  + *
  + * 20010701 marc fleury:
  + * 
  + * Transaction to context wiring was moved to the instance interceptor
  + * 
  + */
   public class EntityContainer
  -extends Container
  -implements ContainerInvokerContainer, InstancePoolContainer
  +   extends Container
  +   implements ContainerInvokerContainer, InstancePoolContainer
   {
  // Constants -
   
  // Attributes 
   
  -   // This is the Home interface class
  +   /** This is the Home interface class. */
  protected Class homeInterface;
   
  -   // This is the Remote interface class
  +   /** This is the Remote interface class. */
  protected Class remoteInterface;
  
  -   // These are the mappings between the home interface methods and the container 
methods
  +   /**
  +* These are the mappings between the home interface methods and the
  +* container methods.
  +*/
  protected Map homeMapping;
   
  -   // These are the mappings between the remote interface methods and the bean 
methods
  +   /**
  +* These are the mappings between the remote interface methods and the
  +* bean methods.
  +*/
  protected Map beanMapping;
  -
  
  -   // This is the container invoker for this container
  +   /** This is the container invoker for this container */
  protected ContainerInvoker containerInvoker;
   
  -   // This is the persistence manager for this container
  +   /** This is the persistence manager for this container */
  protected EntityPersistenceManager persistenceManager;
   
  -   // This is the instance cache for this container
  +   /** This is the instance cache for this container */
  protected InstanceCache instanceCache;
   
  -   // This is the instancepool that is to be used
  +   /** This is the instancepool that is to be used */
  protected InstancePool instancePool;
   
  -   // This provides a way to find the entities that are part of a given transaction
  -   // EntitySynchronizationInterceptor and InstanceSynchronization manage
  -   // this instance.
  +   /**
  +* This provides a way to find the entities that are part of a given
  +* transaction EntitySynchronizationInterceptor and InstanceSynchronization
  +* manage this instance.
  +*/
  protected TxEntityMap txEntityMap = new TxEntityMap();
   
  -   // This is the first interceptor in the chain. The last interceptor must be 
provided by the container itself
  +   /**
  +* This is the first interceptor in the chain. The last interceptor must
  +* be provided by the container itself.
  +*/
  protected Interceptor interceptor;
   
  // Public ---

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb EntityEnterpriseContext.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:10:15

  Modified:src/main/org/jboss/ejb EntityEnterpriseContext.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.21  +197 -191  jboss/src/main/org/jboss/ejb/EntityEnterpriseContext.java
  
  Index: EntityEnterpriseContext.java
  ===
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/EntityEnterpriseContext.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- EntityEnterpriseContext.java  2001/07/03 22:55:29 1.20
  +++ EntityEnterpriseContext.java  2001/07/13 04:10:15 1.21
  @@ -1,9 +1,9 @@
   /*
  -* JBoss, the OpenSource EJB server
  -*
  -* Distributable under LGPL license.
  -* See terms of license at gnu.org.
  -*/
  + * JBoss, the OpenSource EJB server
  + *
  + * Distributable under LGPL license.
  + * See terms of license at gnu.org.
  + */
   package org.jboss.ejb;
   
   import java.rmi.RemoteException;
  @@ -20,194 +20,200 @@
   import javax.transaction.Transaction;
   
   /**
  -*The EntityEnterpriseContext is used to associate EntityBean instances with 
metadata about it.
  -*
  -*@see EnterpriseContext
  -*@author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  -*   @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  -*   @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  -*@version $Revision: 1.20 $
  -*
  -*  Revisions
  -*  20010703 marcf
  -*  
  -*  - setInvoked replaced by "isTxSynchronized", the reason being that we use it 
for Tx registration
  -*  
  -*/
  + * The EntityEnterpriseContext is used to associate EntityBean instances
  + * with metadata about it.
  + *
  + * @see EnterpriseContext
  + * 
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @version $Revision: 1.21 $
  + *
  + * Revisions
  + * 20010703 marcf
  + * 
  + * setInvoked replaced by "isTxSynchronized", the reason being that we
  + * use it for Tx registration.
  + * 
  + */
   public class EntityEnterpriseContext
  -extends EnterpriseContext
  +   extends EnterpriseContext
   {
  - // Attributes 
  - EJBObject ejbObject;
  - EJBLocalObject ejbLocalObject;
  - EntityContext ctx;
  - 
  - // True if this instance has been registered with the TM for transactional 
demarcation
  - boolean isTxSynchronized = false;
  - 
  - // True if this instances' state is valid
  - // when a bean is called the state is not synchronized with the DB
  - // but "valid" as long as the transaction runs
  - boolean valid = false;
  - 
  - // The persistence manager may attach any metadata it wishes to this context 
here
  - private Object persistenceCtx;
  - 
  - //The cacheKey for this context
  - CacheKey key;
  - 
  - // Constructors --
  - public EntityEnterpriseContext(Object instance, Container con)
  - throws RemoteException
  - {
  - super(instance, con);
  - ctx = new EntityContextImpl();
  - ((EntityBean)instance).setEntityContext(ctx);
  - }
  - 
  - // Public 
  - 
  - public void clear() {
  - 
  - super.clear();
  - this.isTxSynchronized = false;
  - this.valid = false;
  - key = null;
  - persistenceCtx = null;
  - ejbObject = null;
  - }
  - 
  - public void discard()
  - throws RemoteException
  - {
  - ((EntityBean)instance).unsetEntityContext();
  - }
  - 
  - public EJBContext getEJBContext()
  - {
  - return ctx;
  - }
  - 
  - public void setEJBObject(EJBObject eo)
  - {
  - ejbObject = eo;
  - }
  - 
  - public EJBObject getEJBObject()
  - {
  - // Context can have no EJBObject (created by finds) in which case we 
need to wire it at call time
  - 
  - return ejbObject;
  - }
  - 
  - public void setEJBLocalObject( EJBLocalObject eo )
  - {
  - ejbLocalObject = eo;
  - }
  - 
  - public EJBLocalObject getEJBLocalObject()
  - {
  - return ejbLocalObject;
  - }
  - 
  - public void setCacheKey(Object key) {
  - this.key = (CacheKey) key;
  - }
  - 
  - public CacheKey getCacheKey() {
  - return key;
  - }
  - 
  - public void setPersistenceContext(Object ctx)
  - {
  - this.persistenceCtx = ctx;
  - }
  - 
  - public Object getPersistenceContext()
  - {
  - return persistenceCtx;
  - }
  - 
  - /*
  - public void

[JBoss-dev] CVS update: jboss/src/main/org/jboss/ejb StatelessSessionContainer.java

2001-07-12 Thread Jason Dillon

  User: user57  
  Date: 01/07/12 21:06:12

  Modified:src/main/org/jboss/ejb StatelessSessionContainer.java
  Log:
  cleaned up
  
  Revision  ChangesPath
  1.22  +522 -487  jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java
  
  Index: StatelessSessionContainer.java
  ===
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- StatelessSessionContainer.java2001/06/18 20:01:21 1.21
  +++ StatelessSessionContainer.java2001/07/13 04:06:12 1.22
  @@ -1,9 +1,9 @@
   /*
  -* JBoss, the OpenSource EJB server
  -*
  -* Distributable under LGPL license.
  -* See terms of license at gnu.org.
  -*/
  + * JBoss, the OpenSource EJB server
  + *
  + * Distributable under LGPL license.
  + * See terms of license at gnu.org.
  + */
   package org.jboss.ejb;
   
   import java.lang.reflect.InvocationTargetException;
  @@ -11,6 +11,7 @@
   import java.security.Principal;
   import java.util.Map;
   import java.util.HashMap;
  +import java.rmi.RemoteException;
   
   import javax.ejb.Handle;
   import javax.ejb.HomeHandle;
  @@ -22,543 +23,577 @@
   import javax.ejb.CreateException;
   import javax.ejb.RemoveException;
   import javax.ejb.EJBException;
  -import org.jboss.logging.Logger;
   
  +import org.jboss.logging.Logger;
   
   /**
  -*   StatelessSessionContainer
  -*   
  -*   @see 
  -*   @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  -*   @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  -*   @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  -*   @version $Revision: 1.21 $
  -*/
  + * The container for stateless session beans.
  + *   
  + * @author mailto:[EMAIL PROTECTED]";>Rickard Öberg
  + * @author mailto:[EMAIL PROTECTED]";>Marc Fleury
  + * @author mailto:[EMAIL PROTECTED]";>Daniel OConnor
  + * @version $Revision: 1.22 $
  + */
   public class StatelessSessionContainer
  -extends Container
  -implements ContainerInvokerContainer, InstancePoolContainer
  +   extends Container
  +   implements ContainerInvokerContainer, InstancePoolContainer
   {
  -// Constants -
  +   // Constants -
   
  -// Attributes 
  -// This is the Home interface class
  -protected Class homeInterface;
  +   // Attributes 
  +
  +   /** This is the Home interface class */
  +   protected Class homeInterface;

  -// This is the Remote interface class
  -protected Class remoteInterface;
  -
  -   // These are the mappings between the home interface methods and the container 
methods
  -protected Map homeMapping;
  -
  -// These are the mappings between the remote interface methods and the bean 
methods
  -protected Map beanMapping;
  +   /** This is the Remote interface class */
  +   protected Class remoteInterface;
   
  -// This is the container invoker for this container
  -protected ContainerInvoker containerInvoker;
  -
  -// This is the instancepool that is to be used
  -protected InstancePool instancePool;
  +   /**
  +* These are the mappings between the home interface methods and the
  +* container methods.
  +*/
  +   protected Map homeMapping;
   
  -// This is the first interceptor in the chain. The last interceptor must be 
provided by the container itself
  -protected Interceptor interceptor;
  +   /**
  +* These are the mappings between the remote interface methods and the
  +* bean methods.
  +*/
  +   protected Map beanMapping;
   
  -// Static 
  +   /** This is the container invoker for this container */
  +   protected ContainerInvoker containerInvoker;
   
  -// Constructors --
  +   /** This is the instancepool that is to be used */
  +   protected InstancePool instancePool;
   
  -// Public 
  -public void setContainerInvoker(ContainerInvoker ci) 
  -{ 
  -if (ci == null)
  -throw new IllegalArgumentException("Null invoker");
  -
  -this.containerInvoker = ci; 
  -ci.setContainer(this);
  -}
  +   /**
  +* This is the first interceptor in the chain. The last interceptor must
  +* be provided by the container itself
  +*/
  +   protected Interceptor interceptor;
   
  -public ContainerInvoker getContainerInvoker() 
  -{ 
  -return containerInvoker; 
  -}
  +   // Static 
   
  -public LocalContainerInvoker getLocalContainerInvoker()