[JBoss-user] loading same native library from different deployment units

2003-06-13 Thread Daniel Santos
Hi all,

I have two deployment units. One is a war and the other is a ejb-jar.
They both include a jar file (as a library) that calls a native API
on a win23 platform. The server tells me that native libraries
cannot be loaded from two different class loaders.

When I put the library jar file on the lib directory there is no
problem because the server class loader loads the native library.

Anyhow, I was wondering if there is any possibility to include the
jar file inside the apps. It's to make the deployment units more
like a black box from the library point of view.

I am running a 3.0.6 instance.

Regards,
Daniel Santos


---
This SF.NET email is sponsored by: eBay
Great deals on office technology -- on eBay now! Click here:
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Running several jboss instances on the same machine

2002-07-24 Thread Daniel Santos

Hello, all

I need to run several Jboss server instances on a machine with one IP address. I have 
different configurations for each developer. I don't know how to assign a different 
port to each conf. Can anyone help me ? (I'm using jetty)

By the way, when I run the jboss startup script and supply it the name of the 
configuration I uses default.

I'm using jboss 3.0.0

Many thanks
Daniel Santos



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



RE: [JBoss-user] CMP 2.0 - CMR fields are NULL

2002-04-21 Thread Daniel Santos

Oliver,

The setting of the cmr fields in the ejb create methods is against the ejb
spec. I know it by experience. It was my first aproach. JBoss itself told me
that.

Thanks for your interest
Daniel

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 22 de Abril de 2002 0:29
To: Daniel Santos
Cc: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] CMP 2.0 - CMR fields are NULL


Hello Daniel,

I think the reason for your problem is the use of ejbPostCreate to set
the CRM fields. When using CMP the record in the database is created
after the call of ejbCreate but before the call of ejbPostCreate.
Therefore your changes to the CMR fields are not persistent, and that's
why the corresponding SQL statements are missing in the trace.

Oliver


Daniel Santos wrote:

hello all !

I'm deploying a hierarchy of entity beans with relations :

FACTORY - PROCESS - COMPONENT - VARIABLE

I call creates from a servlet to create the hierarquy from FACTORY to
VARIABLE.

The CMR fields are set in each ejbPostCreate methods.

PROCESS sets FACTORY, COMPONENT sets process, so on... up to VARIABLE

after calling the servlet I notice that the CMR fields in the db are NULL.

below is the SQL generated. Where are the UPDATES to set the CMR fields ?

environment :
Jboss-3.0.0beta
jdk 1.3.1
w2k
mysql-max 3.23.49 with ISAM tables. I know they are not transactional. I
just need the SELECT FOR UPDATE syntax to work
jdbc driver : mm.mysql-2.0.8-bin.jar

Many thanks.
Daniel Santos

---
-
-

020419 16:36:18  2 Connect root@localhost on
 2 Init DB history
 2 Query   SHOW VARIABLES
 2 Query   SET autocommit=0
 2 Query   show tables  FROM history like 'FACTORY'
 2 Query   rollback
020419 16:36:19  2 Query   CREATE TABLE FACTORY (id VARCHAR(255)
BINARY NOT NULL, name VARCHAR(255) BINARY, CONSTRAINT pk_FACTORY PRIMARY
KEY
(id))
 2 Query   commit
 2 Query   rollback
020419 16:36:21  2 Query   show tables  FROM history like 'EVENT'
 2 Query   rollback
 2 Query   CREATE TABLE EVENT (id VARCHAR(255) BINARY NOT 
NULL,
CONSTRAINT pk_EVENT PRIMARY KEY (id))
 2 Query   commit
 2 Query   rollback
020419 16:36:22  2 Query   show tables  FROM history like
'COMPONENT'
 2 Query   rollback
 2 Query   CREATE TABLE COMPONENT (id VARCHAR(255) BINARY NOT
NULL, name VARCHAR(255) BINARY, process VARCHAR(255) BINARY, CONSTRAINT
pk_COMPONENT PRIMARY KEY (id))
 2 Query   commit
 2 Query   rollback
020419 16:36:24  2 Query   show tables  FROM history like
'VARIABLE'
 2 Query   rollback
 2 Query   CREATE TABLE VARIABLE (id VARCHAR(255) BINARY NOT
NULL, name VARCHAR(255) BINARY, component VARCHAR(255) BINARY, CONSTRAINT
pk_VARIABLE PRIMARY KEY (id))
 2 Query   commit
 2 Query   rollback
020419 16:36:26  2 Query   show tables  FROM history like 'SAMPLE'
 2 Query   rollback
 2 Query   CREATE TABLE SAMPLE (id VARCHAR(255) BINARY NOT 
NULL,
value VARCHAR(255) BINARY, variable VARCHAR(255) BINARY, CONSTRAINT
pk_SAMPLE PRIMARY KEY (id))
 2 Query   commit
 2 Query   rollback
 2 Query   show tables  FROM history like 'PROCESS'
 2 Query   rollback
 2 Query   CREATE TABLE PROCESS (id VARCHAR(255) BINARY NOT
NULL,
name VARCHAR(255) BINARY, factory VARCHAR(255) BINARY, CONSTRAINT
pk_PROCESS
PRIMARY KEY (id))
 2 Query   commit
 2 Query   rollback
020419 16:37:18  2 Query   SET autocommit=0
 2 Query   SELECT VALUE FROM HIGH_KEY WHERE NAME = 
'gruposumol'
FOR UPDATE
 2 Query   INSERT INTO HIGH_KEY (VALUE, NAME) VALUES
('8080808080808080808080808080','gruposumol')
 2 Query   UPDATE HIGH_KEY SET VALUE =
'8180808080808080808080808080' WHERE NAME = 'gruposumol'
 2 Query   SET autocommit=0
 2 Query   rollback
020419 16:37:20  2 Quit
 3 Connect root@localhost on
 3 Init DB history
 3 Query   SHOW VARIABLES
 3 Query   SET autocommit=0
 3 Query   SELECT COUNT(*) FROM FACTORY WHERE
id='80808080808080808080808080808080gruposumol

RE: [JBoss-user] CMP 2.0 - CMR fields are NULL

2002-04-20 Thread Daniel Santos

Mike,

below is the top of FactoryBean.java. the first EJB created in the chain.


---
import javax.ejb.*;

import org.ejbutils.uid.*;
import org.ejbutils.context.*;

public abstract class FactoryBean implements EntityBean {

  EntityContext entityContext;

  public java.lang.String ejbCreate(java.lang.String name) throws
CreateException {
setName(name);
String objectId;
try {
  objectId = UIDDispenser.getDispenser().getNextId();
} catch (UIDDispenserException e) {
  throw new EJBException(e.toString());
}
this.setId(objectId);
return objectId;
  }

  public void ejbPostCreate(java.lang.String name) throws CreateException {
  }
...
---


and here is the start of ProcessBean.java the second created. It has a cmr
field pointing
to the primary key of factory.


---


import java.util.*;
import javax.rmi.*;
import javax.ejb.*;
import javax.naming.*;

import org.ejbutils.uid.*;
import org.ejbutils.context.*;

public abstract class ProcessBean implements EntityBean {

  EntityContext entityContext;

  public String ejbCreate(String factory, String name) throws
CreateException {

setName(name);
String objectId;
try {
  objectId = UIDDispenser.getDispenser().getNextId();
} catch (UIDDispenserException e) {
  throw new EJBException(e.toString());
}
setId(objectId);

return objectId;
  }

  public void ejbPostCreate(String factory, String name) throws
CreateException {
try {
  Context ctx = new InitialContext();
  FactoryLocalHome flhome =
(FactoryLocalHome)ctx.lookup(java:comp/env/ejb/Factory);
  FactoryLocal fl = flhome.findByName(factory);
  this.setFactory(fl);
} catch (NamingException e) {
  throw new EJBException(e.toString());
} catch (FinderException e) {
  throw new CreateException(e.toString());
}
  }
...
---


Did not declare the cmr fields in the ejb-jar.xml file, nor the jboss.xml
file.

All the ejb creates use the UIDispenser from Emmanuel Sciara (many thanks,
and everyone that contibuted to the solution). The process bean sets the cmr
field pointing to its factory that is looked up by name, in the
ejbPostCreate method.

Many thanks
Daniel




-Original Message-
From: Mike Dougherty [mailto:[EMAIL PROTECTED]]
Sent: sexta-feira, 19 de Abril de 2002 21:28
To: Daniel Santos
Cc: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] CMP 2.0 - CMR fields are NULL


Daniel,

I'm not sure I completely understand the situation. Maybe if you sent
some Java code snippets I could take a stab at it. Like just the
ejbCreate and ejbPostCreate methods for Variable or Factory
which ever one is calling the setter method.

/mike


On Fri, 2002-04-19 at 08:54, Daniel Santos wrote:
 hello all !

 I'm deploying a hierarchy of entity beans with relations :

 FACTORY - PROCESS - COMPONENT - VARIABLE

 I call creates from a servlet to create the hierarquy from FACTORY to
 VARIABLE.

 The CMR fields are set in each ejbPostCreate methods.

 PROCESS sets FACTORY, COMPONENT sets process, so on... up to VARIABLE

 after calling the servlet I notice that the CMR fields in the db are NULL.

 below is the SQL generated. Where are the UPDATES to set the CMR fields ?

 environment :
 Jboss-3.0.0beta
 jdk 1.3.1
 w2k
 mysql-max 3.23.49 with ISAM tables. I know they are not transactional. I
 just need the SELECT FOR UPDATE syntax to work
 jdbc driver : mm.mysql-2.0.8-bin.jar

 Many thanks.
 Daniel Santos

 --
--
 -

 020419 16:36:18 2 Connect root@localhost on
 2 Init DB history
 2 Query   SHOW VARIABLES
 2 Query   SET autocommit=0
 2 Query   show tables  FROM history like 'FACTORY'
 2 Query   rollback
 020419 16:36:19 2 Query   CREATE TABLE FACTORY (id VARCHAR(255)
 BINARY NOT NULL, name VARCHAR(255) BINARY, CONSTRAINT pk_FACTORY PRIMARY
KEY
 (id))
 2 Query   commit
 2 Query   rollback
 020419 16:36:21 2 Query   show tables  FROM history like 'EVENT'
 2 Query   rollback
 2 Query   CREATE TABLE EVENT (id VARCHAR(255) BINARY NOT 
NULL,
 CONSTRAINT pk_EVENT PRIMARY KEY (id))
 2 Query   commit
 2 Query   rollback
 020419 16:36:22 2 Query   show tables  FROM history like
 'COMPONENT'
 2 Query   rollback
 2 Query   CREATE TABLE COMPONENT (id VARCHAR(255) BINARY NOT
 NULL, name VARCHAR(255) BINARY, process VARCHAR(255) BINARY, CONSTRAINT
 pk_COMPONENT PRIMARY KEY (id))
 2 Query   commit

[JBoss-user] CMP 2.0 - CMR fields are NULL

2002-04-19 Thread Daniel Santos

hello all !

I'm deploying a hierarchy of entity beans with relations :

FACTORY - PROCESS - COMPONENT - VARIABLE

I call creates from a servlet to create the hierarquy from FACTORY to
VARIABLE.

The CMR fields are set in each ejbPostCreate methods.

PROCESS sets FACTORY, COMPONENT sets process, so on... up to VARIABLE

after calling the servlet I notice that the CMR fields in the db are NULL.

below is the SQL generated. Where are the UPDATES to set the CMR fields ?

environment :
Jboss-3.0.0beta
jdk 1.3.1
w2k
mysql-max 3.23.49 with ISAM tables. I know they are not transactional. I
just need the SELECT FOR UPDATE syntax to work
jdbc driver : mm.mysql-2.0.8-bin.jar

Many thanks.
Daniel Santos


-

020419 16:36:18   2 Connect root@localhost on
  2 Init DB history
  2 Query   SHOW VARIABLES
  2 Query   SET autocommit=0
  2 Query   show tables  FROM history like 'FACTORY'
  2 Query   rollback
020419 16:36:19   2 Query   CREATE TABLE FACTORY (id VARCHAR(255)
BINARY NOT NULL, name VARCHAR(255) BINARY, CONSTRAINT pk_FACTORY PRIMARY KEY
(id))
  2 Query   commit
  2 Query   rollback
020419 16:36:21   2 Query   show tables  FROM history like 'EVENT'
  2 Query   rollback
  2 Query   CREATE TABLE EVENT (id VARCHAR(255) BINARY NOT 
NULL,
CONSTRAINT pk_EVENT PRIMARY KEY (id))
  2 Query   commit
  2 Query   rollback
020419 16:36:22   2 Query   show tables  FROM history like
'COMPONENT'
  2 Query   rollback
  2 Query   CREATE TABLE COMPONENT (id VARCHAR(255) BINARY NOT
NULL, name VARCHAR(255) BINARY, process VARCHAR(255) BINARY, CONSTRAINT
pk_COMPONENT PRIMARY KEY (id))
  2 Query   commit
  2 Query   rollback
020419 16:36:24   2 Query   show tables  FROM history like
'VARIABLE'
  2 Query   rollback
  2 Query   CREATE TABLE VARIABLE (id VARCHAR(255) BINARY NOT
NULL, name VARCHAR(255) BINARY, component VARCHAR(255) BINARY, CONSTRAINT
pk_VARIABLE PRIMARY KEY (id))
  2 Query   commit
  2 Query   rollback
020419 16:36:26   2 Query   show tables  FROM history like 'SAMPLE'
  2 Query   rollback
  2 Query   CREATE TABLE SAMPLE (id VARCHAR(255) BINARY NOT 
NULL,
value VARCHAR(255) BINARY, variable VARCHAR(255) BINARY, CONSTRAINT
pk_SAMPLE PRIMARY KEY (id))
  2 Query   commit
  2 Query   rollback
  2 Query   show tables  FROM history like 'PROCESS'
  2 Query   rollback
  2 Query   CREATE TABLE PROCESS (id VARCHAR(255) BINARY NOT 
NULL,
name VARCHAR(255) BINARY, factory VARCHAR(255) BINARY, CONSTRAINT pk_PROCESS
PRIMARY KEY (id))
  2 Query   commit
  2 Query   rollback
020419 16:37:18   2 Query   SET autocommit=0
  2 Query   SELECT VALUE FROM HIGH_KEY WHERE NAME = 
'gruposumol'
FOR UPDATE
  2 Query   INSERT INTO HIGH_KEY (VALUE, NAME) VALUES
('8080808080808080808080808080','gruposumol')
  2 Query   UPDATE HIGH_KEY SET VALUE =
'8180808080808080808080808080' WHERE NAME = 'gruposumol'
  2 Query   SET autocommit=0
  2 Query   rollback
020419 16:37:20   2 Quit
  3 Connect root@localhost on
  3 Init DB history
  3 Query   SHOW VARIABLES
  3 Query   SET autocommit=0
  3 Query   SELECT COUNT(*) FROM FACTORY WHERE
id='80808080808080808080808080808080gruposumol'
  3 Query   INSERT INTO FACTORY (id, name) VALUES
('80808080808080808080808080808080gruposumol', 'factory')
020419 16:37:21   3 Query   commit
  3 Query   rollback
  3 Query   SELECT COUNT(*) FROM PROCESS WHERE
id='80808080808080808080808080808180gruposumol'
  3 Query   INSERT INTO PROCESS (id, name, factory) VALUES
('80808080808080808080808080808180gruposumol', 'process', null)
  3 Query   SELECT t1_f.id FROM FACTORY t1_f WHERE t1_f.name =
'factory'
  3 Query   SELECT name FROM FACTORY WHERE
(id='80808080808080808080808080808080gruposumol')
  3 Query   SELECT id FROM PROCESS WHERE
(factory='80808080808080808080808080808080gruposumol')
  3

[JBoss-user] JBoss 3.0 beta and JMS

2002-04-10 Thread Daniel Santos

Hello !

I'm having trouble putting a JMS app running on Jboss 3.0 beta. I am able to
obtain a JNDI context and a queue, but no connection factory. In JBoss 2.4.4
everything is fine.

I'm trying to get the OIL connection factory which I then cast to a
QueueConnectionFactory.

connectionFactory =
lookupConnectionFactory(props.getProperty(JMS_CONN_FACTORY));

where JMS_CONN_FACTORY = ConnectionFactory

When the previous statement is executed the connectionFactory is null and no
exception is thrown. I have the client side JBossMQ jars in the classpath.

Environment :
JDK 1.3.1
Jboss 3.0.0 beta
Os : Windows 2000 Professional

I'm attaching the java file with the above code.

Many thanks.
Daniel Santos



JMSMessaging.java
Description: JavaScript source


RE: [JBoss-user] JBoss 3.0 beta and JMS

2002-04-10 Thread Daniel Santos

I looked in the section you mentioned and there it was :

ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)

I can get a queue to where I am supposed to send messages.

Daniel

-Original Message-
From: Alex Loubyansky [mailto:[EMAIL PROTECTED]]
Sent: quarta-feira, 10 de Abril de 2002 19:00
To: 'Daniel Santos'
Subject: RE: [JBoss-user] JBoss 3.0 beta and JMS


Yes, it could be verified this way. But also you can scroll down to jboss
service=JNDIView and watch all bindings.
Sorry, can't see the cause of the problem now. Can you get something else
from JNDI?

alex

 -Original Message-
 From: Daniel Santos [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, April 10, 2002 7:59 PM
 To: [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Subject: RE: [JBoss-user] JBoss 3.0 beta and JMS


 In the agent view I looked under jbossmq :
 service=InvocationLayer,type=OIL
 and in the mbean view I see an attribute
 ConnectionFactoryJNDIRef with the
 value ConnectionFactory.
 Is this what you mean by the JNDI Viewer ?

 Daniel

 -Original Message-
 From: Alex Loubyansky [mailto:[EMAIL PROTECTED]]
 Sent: quarta-feira, 10 de Abril de 2002 17:31
 To: 'Daniel Santos'
 Subject: RE: [JBoss-user] JBoss 3.0 beta and JMS


 Do you see ConnectionFactory in jndi viewer?
 I use messaging with JBoss-2.4.3 and JBoss-3.0.0beta2 almost
 successfully.
 Though, I have other problems. It seems, there are some bugs exist.

 alex


  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED]]On Behalf Of
  Daniel Santos
  Sent: Wednesday, April 10, 2002 4:18 PM
  To: [EMAIL PROTECTED]
  Subject: [JBoss-user] JBoss 3.0 beta and JMS
 
 
  Hello !
 
  I'm having trouble putting a JMS app running on Jboss 3.0
  beta. I am able to
  obtain a JNDI context and a queue, but no connection factory.
  In JBoss 2.4.4
  everything is fine.
 
  I'm trying to get the OIL connection factory which I then cast to a
  QueueConnectionFactory.
 
  connectionFactory =
  lookupConnectionFactory(props.getProperty(JMS_CONN_FACTORY));
 
  where JMS_CONN_FACTORY = ConnectionFactory
 
  When the previous statement is executed the connectionFactory
  is null and no
  exception is thrown. I have the client side JBossMQ jars in
  the classpath.
 
  Environment :
  JDK 1.3.1
  Jboss 3.0.0 beta
  Os : Windows 2000 Professional
 
  I'm attaching the java file with the above code.
 
  Many thanks.
  Daniel Santos
 




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