[JBoss-user] Loading classes from a jar file dynamicaly

2001-05-31 Thread Francois Archambault

I need to know how to load classes from a jar file dynamicaly.  I
inspect a little bit the JBoss source code and I think I could find the
answer to my problem into the source code of
javax.management.loading.MLet.  But where can I find this source ?  I've
look at the source of JBoss through the Browse source on-line link but
I was not able to find it ?  Someone know where to find this source, or
know how to load class from a .jar file dynamicaly and could give me
some example.

Thanks
Francois Archambault

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



[JBoss-user] Problem with Beans Bridge

2001-05-04 Thread Francois Archambault

Hi,

I'm trying to access a bean inside of JBoss from an application in VB.
I'm doing it through the JavaBeans Bridge from sun.  But after a couple
of test my JBoss don't want to start anymore. It seems like there is a
problem with JRE. I've already got this problem before after installing
the latest JRE.  The problem was solved by removing the JRE I just
installed, but now I have remove this JRE and still have the problem. I
don't know if someone have went into this kind of problem but maybe the
registry could have something to do with it. 

I'm using
- Windows 2000
- JBuilder4
- JBoss 2.2.1
- JRE 1.3.0_02 (the one that I have removed)

Here is the error I receive when starting JBoss:
Using configuration default
java.lang.NoClassDefFoundError: javax/management/MBeanRegistration
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
com.sun.management.jmx.MBeanServerImpl.findClass(MBeanServerImpl.java
:2466)
at
com.sun.management.jmx.MBeanServerImpl.createMBean(MBeanServerImpl.ja
va:751)
at javax.management.loading.MLet.getMBeansFromURL(MLet.java:540)
at javax.management.loading.MLet.getMBeansFromURL(MLet.java:369)
at org.jboss.Main.init(Main.java:173)
at org.jboss.Main$1.run(Main.java:107)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.Main.main(Main.java:103)

Any help is appreciated 

Thanks
Francois Archambault


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



RE: [JBoss-user] not bound problem

2001-05-03 Thread Francois Archambault

You just can't have access to a data source outside of the container.
You need to get the datasource from within an ejb.

Francois

 -Message d'origine-
 De:   Michael Baedorf [SMTP:[EMAIL PROTECTED]]
 Date: 3 mai, 2001 09:50
 À:[EMAIL PROTECTED]
 Objet:[JBoss-user] not bound problem
 
 Hello,
 
 I´m a newbie and I have a problem getting a database connection.
 
 I configured the following in the jboss.jcml:
   
   mbean code=org.jboss.jdbc.JdbcProvider
 name=DefaultDomain:service=JdbcProvider
  attribute name=Drivers  
 
 
 org.hsql.jdbcDriver,org.enhydra.instantdb.jdbc.idbDriver,org.gjt.mm.my
 sql.Driver
  /attribute
   /mbean
 
 
mbean code=org.jboss.jdbc.XADataSourceLoader  
   name=DefaultDomain:service=XADataSource,name=MySqlDB
 attribute name= DataSourceClass
  
 org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl/attribute
 attribute name=PoolNameMySqlDB/attribute
 attribute name=URLjdbc:mysql://localhost:3306/gsfs/attribute
 attribute name=MinSize10/attribute
 attribute name=MaxSize100/attribute
 attribute name=JDBCUsergsfs/attribute
 attribute name=Passwordgsfs/attribute
   /mbean
 
 In the standardjaws.xml I added:
 datasourcejava:/MySqlDB/datasource
 type-mappingmySQL/type-mapping
 
 After starting the server I get the message:
[MySqlDB] Starting
[MySqlDB] XA Connection pool MySqlDB bound to java:/MySqlDB
[MySqlDB] Started
 
 JNDIView result:
 java: Namespace
   +- MinervaXACMFactory (class: 
   org.opentools.minerva.connector.jboss.MinervaXACMFactory)
   +- DefaultDS (class: org.opentools.minerva.jdbc.xa.XAPoolDataSource)
   +- SecurityProxyFactory (class:
 org.jboss.security.SubjectSecurityProxyFactory)
   +- MySqlDB (class: org.opentools.minerva.jdbc.xa.XAPoolDataSource)
   ...
 
 Now I try to look for the DB (not using a bean nor a servlet):
 try {   
props = new Properties();
props.setProperty  
   (java.naming.factory.initial,
 org.jnp.interfaces.NamingContextFactory);
props.setProperty
   (java.naming.provider.url, localhost:1099);
props.setProperty
   (java.naming.factory.url.pkgs, org.jboss.naming);
 
 ctx = new InitialContext(props);
 System.out.println(Got Context);
 
 objRef = ctx.lookup(MySqlDB);
 System.out.println(Got Reference);
...
 } catch ...
 
 Running the simple program only throw an exception:
 MySqlDB not bound
 
 I included all packages mentioned in chapter 1 of the online
 documentation.
 
 Can somebody tell me what´s the error?
 
 Thanks.
 
 -- 
 GMX - Die Kommunikationsplattform im Internet.
 http://www.gmx.net
 
 
 
 -- 
 GMX - Die Kommunikationsplattform im Internet.
 http://www.gmx.net
 
 
 ___
 JBoss-user mailing list
 [EMAIL PROTECTED]
 http://lists.sourceforge.net/lists/listinfo/jboss-user

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



[JBoss-user] Flushing Cache (For Simone ?)

2001-04-18 Thread Francois Archambault

Hi,

We have the following problem :

The problem is that we have to deal with direct access to the underlying
database. We absolutely cannot make all accesses go through the EJB
layer (for now that is). While this is the case, we have to find ways to
make JBoss refresh the data from the physical database when it is
changed.

So we thought it would be simple to add a SSB to offer cache management
services to our "old" application to call. ie. make changes through
VB/ADO/OleDB application and "inform" the JBoss server that those tables
need to be "flushed".

But we do want to keep the cache, because it is more efficient.

So we created our own LRUEnterpriseContextCachePolicy class to be able
to passivate beans with JMS messages.  We actually call the ageOut
method with the beans key we want to flush by going through the LRUList
obtains from getList() method. But there is still a problem, the beans
that are in a transaction don't get passivated.

How can we ensure that all the beans we want to be passivate get
passivated and  that, wathever is the age of the bean ?

Thanks
Francois Archambault


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



[JBoss-user] Flushing the cache

2001-04-12 Thread Francois Archambault

Hi,

I need to flush the cache manually.  I already know that there is a tag
overager-period that does an auto passivate on bean that are older
than the max-bean-age. But how can I do a passivate manually on every
bean in the cache when I need it.

Thanks for the help
Francois Archambault

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