Re: [JBoss-user] Number of active EJBs

2003-11-12 Thread Adrian Brock
On Wed, 2003-11-12 at 17:39, Podgaetsky, Genady wrote:
> Hi
> I'm trying to get started with EjB on JBoss and wondering can I get a
> number of active EJB's?
> I looked at the JMX console and saw no details under
> jndiName=EJBName,service=EJB
> Can anyone elaborate on this?

http://localhost:8080/web-console

But I would guess you have an older version of jboss that doesn't
have this?

Regards,
Adrian

> Thanks,
> Genady
> 
> NOTICE: This communication contains information which may be
> proprietary, privileged or confidential. If you are not the intended
> recipient (or authorized to receive for the intended recipient), or
> believe that you have received this communication in error, please do
> not print, copy, retransmit, disseminate, disclose or otherwise use
> the information. Also, please indicate to the sender that you have
> received this communication in error and delete the copy you received.
> Thank you.
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Load Balancing & Failover For JMX RMIAdapter - Solved - But One More Thing...

2003-11-12 Thread Adrian Brock
Hi,

You will find an example for load balancing an MBean
in the jmx tests in the testsuite of 3.2.2
There is now a generic HA proxy factory extending the
one described in Chapter 2 of the admin docs.

To avoid your particular problem, you'll need
something similar to the clean shutdown interceptor
that is available for ejbs, except as an XMBean interceptor.

Regards,
Adrian

On Wed, 2003-11-12 at 21:01, Nicholas wrote:
> I figured out what I was doing wrong after some
> drifting through the source code. Anyways, now it load
> balances fine.
> 
> (Instead of sourceObject.getClass(), I used
> org.jboss.jmx.adaptor.rmi.RMIAdaptor.class.)
> 
> However, I observed that when I tried to test the
> failover by stopping one of my servers, the call to
> the **stopping** server failed saying
> 
> Cause: javax.management.InstanceNotFoundException:
> myDomain:name=SyncProcess is not registered.
> 
> Obviously the call went in after my MBean had been
> unregistered, but before the RMI service had stopped.
> 
> Other than implementing a retry loop in the client,
> can anyone recommend a solution to this ?
> 
> Thanks.
> 
> //Nicholas
> 
> --- Nicholas <[EMAIL PROTECTED]> wrote:
> > I am trying to set up a cluster of MBean services
> > where we have a set of custom MBeans. I would like
> > to
> > use load balancing and failover for the MBean
> > clients,
> > but it I realize that jmx/rmi/RMIAdaptor is not "HA
> > ready".  (Using 3.2.1, 3.2.2 and 3.2.3RC1)
> > 
> > Reviewing the docs, I tried to implement this
> > example:
> > 
> > HAPartition myPartition =
> > (HAPartition)ctx.lookup(Â/HAPartition/Â +
> > partitionName); 
> > HARMIServer rmiserver = new
> > HARMIServerImpl(myPartition, "MyService",
> > MyService.class, myService); 
> > MyService stub =
> > (MyService)rmiserver.createHAStub(new
> > RoundRobin());
> > 
> > I am not sure if this is the right way to go, but
> > screw the torpedoes
> > 
> > The first thing I ran into is that although
> > HARMIServerImpl implements createHAStub(), the
> > interface HARMIServer does not. 
> > 
> > So I did this:
> > 
> > Object sourceObject =
> > ctx.lookup("jmx/rmi/RMIAdaptor");
> > HAPartition myPartition =
> > (HAPartition)ctx.lookup("/HAPartition/" +
> > partitionName);
> > HARMIServer rmiserver = new
> > HARMIServerImpl(myPartition, "HARMIAdaptor",
> > sourceObject.getClass(), sourceObject);
> > // Here I cast the HARMIServer to a HARMIServerImpl 
> > org.jboss.jmx.adaptor.rmi.RMIAdaptor stub =
> >
> (org.jboss.jmx.adaptor.rmi.RMIAdaptor)((HARMIServerImpl)rmiserver).createHAStub(new
> > RoundRobin());
> > 
> > Then I take the stub and bind it back into JNDI
> > where
> > I can retrieve it later.
> > 
> > Well it compiled fine..(famous last words), but
> > at
> > runtine I get this error:
> > 
> > java.lang.IllegalArgumentException: $Proxy25 is not
> > an
> > interface
> > at
> >
> java.lang.reflect.Proxy.getProxyClass(Proxy.java:340)
> > at
> >
> java.lang.reflect.Proxy.newProxyInstance(Proxy.java:552)
> > at
> >
> org.jboss.ha.framework.server.HARMIServerImpl.createHAStub(HARMIServerImpl.java:184)
> > at
> >
> com.adp.sbs.jboss.ha.HAExporter.start(HAExporter.java:58)
> > 
> > Am I going in the right direction ?
> > 
> > Thanks.
> > 
> > //Nicholas
> > 
> > 
> >
> ---
> > This SF.Net email sponsored by: ApacheCon 2003,
> > 16-19 November in Las Vegas. Learn firsthand the
> > latest
> > developments in Apache, PHP, Perl, XML, Java, MySQL,
> > WebDAV, and more! http://www.apachecon.com/
> > ___
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> >
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 
> 
> =
> Nicholas Whitehead
> Home: (973) 377 9335
> Cell: (201) 615 2716
> [EMAIL PROTECTED]
> Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/
> 
> 
> ---
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Commit option C BIG PROBLEM with 3.2.2 final release

2003-11-12 Thread Adrian Brock
On Wed, 2003-11-12 at 21:55, Boulatian, Misak wrote:
> Hi all,
> 
> I've just downloaded the latest release 3.2.2. The release 3.2.1 had a
> problem with commit option c unable to passivate due to ctx lock. I've
> tried to use 3.2.2 to see if this problem is fixed. It seems like it
> got worse. One thing I noticed is with commit option c jboss returns
> or destroys the bean before saving the state in memory. If we use
> create() it creates entries in database. Right after create assign any
> fields using set methods on remote interface and exit your session
> bean. Those settings will not be saved to database. The behavior is
> not the same with commit option A or B. This is a very big bug. By the
> way, we use ejb 1.1 with 2.0 descriptor and declare cmp-version=1.x in
> ejb-jar.xml descriptor. 

Hi,

The last time this was reported, it was due to broken
isModified() processing in the reporter's bean.

Since you haven't used search
http://www.mail-archive.com/jboss-user%40lists.sourceforge.net/
I'll repeat the same request.

Enable TRACE logging (there is an example in conf/log4j.xml) for:
org.jboss.ejb
org.jboss.tm

then post the "snippet" for the transaction, **NOT THE WHOLE LOG**,
where it fails to store the data.

Regards,
Adrian

> 
> I appreciate the response,
> Misak 
> 
> 
> 
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and
> confidential. If the reader of the message is not the intended
> recipient or an authorized representative of the intended recipient,
> you are hereby notified that any dissemination of this communication
> is strictly prohibited. If you have received this communication in
> error, please notify us immediately by e-mail and delete the message
> and any attachments from your system.
-- 
 
Adrian Brock
Director of Support
Back Office
JBoss Group, LLC 
 



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] How to develop Weblogic Startup Class like feature in JBoss 3.2? Please Help

2003-11-12 Thread Sasidharan, Manoj
Hello All,

I am desperately looking for some help in developing a JBoss Mbean to solve
our application startup logic issue.

We are moving from Weblogic 7.0 to JBoss 3.2. So looking for some way to
implement the Weblogic Startup Class functionality in JBoss.

Any help on this would be highly appreciated.

Thanks in advance for your time and suggestions/help.

Best Regards
MS


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] XMLLoginConfig doesn't clear JaasSecurityManager cache when redeployed

2003-11-12 Thread Chris Bonham
JBoss 3.2.2 final
Windows XP Pro SP1
Sun JDK 1.4.1_04

I've implemented a stackable SecurityConfig bean as described chapter 8 of the
JBoss documentation and added as Patch [ 828977 ]:

http://sourceforge.net/tracker/?func=detail&aid=828977&group_id=22866&atid=376687

I've included the implementation in a SAR which is inside of an EAR with a WAR,
EJB and other JARs.  When a user is authenticated successfully, and then the
app is redeployed, the same user is obtained from the specific JaasSecurityManager
cache.

This wouldn't be a problem except for the Subject stored in the cache contains
an instance of a Principal class which was loaded by the original classloader.
Upon redeployment, this Principal class is loaded by the new classloader, and
it of course is not an instance of the original Principal class.

It appears that when a SecurityConfig is destroyed, its JaasSecurityManager
instances should also be destroyed.  Does this proposal make sense?

The workaround currently is to flush the appropriate JaasSecurityManager cache
when the SecurityConfig is destroyed, or wait for the cache entry to expire.
However, the application config name must be hard coded because there's no way
to see all the configurations managed by the SecurityConfig.  Is it acceptable
to return all the configurations (from a security standpoint)?

Thanks.

--
Chris Bonham
President/CEO
Third Eye Consulting, Inc.
[EMAIL PROTECTED]
http://www.thirdeyeconsulting.com
317.823.3686
317.823.0353 (FAX)


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] EJB not bound / Fail to lookup MEJB (JSR-77)

2003-11-12 Thread Scott M Stark
The jsr77 MEJB is not deployed by default in 3.2.2. Its sitting in
the jboss-3.2.2/docs/examples/jmx/ejb-management.jar so copy that
to the deploy directory.
--

Scott Stark
Chief Technology Officer
JBoss Group, LLC

Mariano Kamp wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi, 

  after reading this: http://www.onjava.com/pub/a/onjava/2002/03/27/
jsr77.html?page=2 I wanted to run the following code, but with no success so 
far:

		log("started.\n");

Properties p = new Properties();
p.setProperty(
Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
p.setProperty(Context.PROVIDER_URL, "localhost:1099");
p.setProperty(
Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
log("Aquiring context");
Context ctx = new InitialContext(p);
log(".\n");

log("Looking up mejb reference");
Object o = ctx.lookup("ejb/mgmt/MEJB");   <-- Line 34
log(".\n");


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] JNDIView Classloading deadlock?

2003-11-12 Thread Scott M Stark
Deadlock is not going to produce 100% cpu usage, and I see no class
loading going on in this dump. The JNDIView is recursing resolving
child contexts and is 519 deep. I doubt you actually have that
nested a namespace so there must be a cycle in the JNDI tree that
is causing the looping.
--

Scott Stark
Chief Technology Officer
JBoss Group, LLC

Chris Bonham wrote:

I'm running JBoss 3.2.2 final on Windows XP Pro SP1, Sun JDK 1.4.1_04.  When
I try to call the list method on JNDIView through jmx-console, the application
jumps to ~500MB memory and 100% CPU.  I've included the full thread dump; there
appears to be a deadlock loading a class at JNDIView.java:307.  Any ideas?
Thanks.

--
Chris Bonham
President/CEO
Third Eye Consulting, Inc.
[EMAIL PROTECTED]
http://www.thirdeyeconsulting.com
317.823.3686
317.823.0353 (FAX)




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Re: Problem with SQL query for MySQL

2003-11-12 Thread Paul Ekeland
sorry, my mistake. I pasted the corrected SQL query. The generated one 
does not have a space between the table name and the opening parenthesis 
"(", as you can see: "CREATE TABLE user(user_id INTEGER NOT NULL,login 
VARCHAR(250) BINARY, password_ VARCHAR(250) BINARY, first_name 
VARCHAR(250) BINARY, last_name VARCHAR(250) BINARY, gender VARCHAR(250) 
BINARY, email VARCHAR(250) BINARY, school_id INTEGER, CONSTRAINT pk_user 
PRIMARY KEY (user_id))" --__--__-- Message: 8 Date: Wed, 12 Nov 2003 
13:30:22 +0200 From: Alexey Loubyansky <[EMAIL PROTECTED]> To: 
[EMAIL PROTECTED] Subject: Re: [JBoss-user] Problem with 
SQL query for MySQL Reply-To: [EMAIL PROTECTED] As far as 
I remember, Rafal's problem was "no space after table name". What's your 
problem? I just executed your DDL in MySql w/o problems. Paul Ekeland 
wrote:

Hello,

I have exactly the same problem as Rafal, but with the following 
JBoss-generated query:
"CREATE TABLE user (user_id INTEGER NOT NULL,login VARCHAR(250) BINARY,
password_ VARCHAR(250) BINARY, first_name VARCHAR(250) BINARY, last_name 
VARCHAR(250) BINARY, gender VARCHAR(250) BINARY, email VARCHAR(250) 
BINARY, school_id INTEGER, CONSTRAINT pk_user PRIMARY KEY (user_id))"

I downloaded the latest JBoss 3.2.3RC1, released today but unfortunately 
with the same result..
Were your modification taken in account in this release or is it a 
different problem?
Thanks,

Paul


 

Branch_3_2
   



Rafal Kedziorski wrote:
 > At 20:24 28.10.2003 +0200, Alexey Loubyansky wrote:
 > >> It is fixed now.
 > > > In main cvs branch?
 > > > Regards,
 > Rafal
 > > >> alex
 >>
 >> Rafal Kedziorski wrote:
 >>
 >>> hi,
 >>> I'm using MySQL 4.0.13 and 4.0.14 (4.0.16 I will test tomorrow) and 
 >>> JBoss 3.2.2. And I have problems with this query (generated by JBoss):
 >>> insert into user(class_id, retail_id, mandant_id, language_id, >>> 
user_data_id, nickname, login_name, password, status, creation_date, >>> 
last_login_date) values ('35F7A660096411D89BC0D1907F01', '1234', >>> 
2, 1, null, null, '[EMAIL PROTECTED]', 'demo', 8, '2003-10-28 >>> 17:31:36', 
null)
 >>> but the same query with space after user
 >>> insert into user (class_id, retail_id, mandant_id, language_id, >>> 
user_data_id, nickname, login_name, password, status, creation_date, >>> 
last_login_date) values ('35F7A660096411D89BC0D1907F01', '1234', >>> 
2, 1, null, null, '[EMAIL PROTECTED]', 'demo', 8, '2003-10-28 >>> 17:31:36', 
null)
 >>> works.
 >>> This exception is shown:
 >>> 17:31:36,406 ERROR [UserEntityBean] Could not create entity >>> 
java.sql.SQLException: Syntax error or access violation,  message >>> 
from server: "You have an error in your SQL syntax.  Check the manual 
 >>> that corresponds to your MySQL server version for the right syntax 
to >>> use near 'user(class_id, retail_id, mandant_id, language_id, >>> 
user_data_id" at >>> 
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651) at >>> 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889) at >>> 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956) at >>> 
com.mysql.jdbc.Connection.execSQL(Connection.java:1874) at >>> 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1700 
 >>> ) at >>> 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1569 
 >>> ) at >>>
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:321) 

 >>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.executeInsert(JDBCMySQLCreateCommand.java:66) 

 >>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:295) 

 >>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:144) 

 >>> at >>> 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:518) 

 >>> at >>>
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:208) 
 >>> at >>>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:269) 

 >>> at >>> 
org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580) 
 >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>> 
Method)  at >>> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
 >>> at >>> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
 >>> at java.lang.reflect.Method.invoke(Method.java:324) at >>>
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1042) 
 >>> at >>> 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) 
 >>> at >>>
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197) 

 >>> at >>>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInte

[JBoss-user] EJB not bound / Fail to lookup MEJB (JSR-77)

2003-11-12 Thread Mariano Kamp
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi, 

  after reading this: http://www.onjava.com/pub/a/onjava/2002/03/27/
jsr77.html?page=2 I wanted to run the following code, but with no success so 
far:

log("started.\n");

Properties p = new Properties();
p.setProperty(
Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
p.setProperty(Context.PROVIDER_URL, "localhost:1099");
p.setProperty(
Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");

log("Aquiring context");
Context ctx = new InitialContext(p);
log(".\n");


log("Looking up mejb reference");
Object o = ctx.lookup("ejb/mgmt/MEJB");   <-- Line 34
log(".\n");


That is the output:
started.
Aquiring context.
Looking up mejb referenceException in thread "main" 
javax.naming.NameNotFoundException: ejb not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:495)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:503)
at org.jnp.server.NamingServer.getObject(NamingServer.java:509)
at org.jnp.server.NamingServer.lookup(NamingServer.java:253)
at sun.reflect.GeneratedMethodAccessor36.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread.java:534)
at 
sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at Test.main(Test.java:34)

  From the webconsole I can at least see this:

[..]
jboss.management.local

J2EEApplication=http-invoker.sar,J2EEServer=Local,WebModule=invoker.war,j2eeType=Servlet,name=EJBInvokerHAServlet
J2EEApplication=http-invoker.sar,J2EEServer=Local,WebModule=invoker.war,j2eeType=Servlet,name=EJBInvokerServlet
J2EEApplication=http-invoker.sar,J2EEServer=Local,WebModule=invoker.war,j2eeType=Servlet,name=JMXInvokerServlet
J2EEApplication=http-invoker.sar,J2EEServer=Local,WebModule=invoker.war,j2eeType=Servlet,name=JNDIFactory
[..]
  
  and

jboss.j2ee

service=EARDeployer

[..]

  Googling didn't help so far. Any ideas?

  I am running Sun's JDK 1.4.2 on Linux 2.4.22 / Debian unstable with Tomcat 
3.2.2.  Anything else I can provide?

Cheers,
Mariano
- -- 
Get public key from
http://blackhole.pca.dfn.de:11371/pks/lookup?op=get&search=0xE4AC1483
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/srEjSraqt+SsFIMRAmT4AJ9x5BM0lDreI0PJ8k91MBCd9ifbvQCfajhP
awHezrog5SaoOGiuLeJw5MY=
=0W40
-END PGP SIGNATURE-



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Commit option C BIG PROBLEM with 3.2.2 final release

2003-11-12 Thread Boulatian, Misak



Hi all,I've just downloaded the latest 
release 3.2.2. The release 3.2.1 had a problem with commit option c unable to 
passivate due to ctx lock. I've tried to use 3.2.2 to see if this problem is 
fixed. It seems like it got worse. One thing I noticed is with commit option c 
jboss returns or destroys the bean before saving the state in memory. If we use 
create() it creates entries in database. Right after create assign any fields 
using set methods on remote interface and exit your session bean. Those settings 
will not be saved to database. The behavior is not the same with commit option A 
or B. This is a very big bug. By the way, we use ejb 1.1 with 2.0 descriptor and 
declare cmp-version=1.x in ejb-jar.xml descriptor. I appreciate the 
response,Misak 
This message and any attachments are intended only for the use of the addressee and
may contain information that is privileged and confidential. If the reader of the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.



Re: [JBoss-user] error in cvs tree

2003-11-12 Thread Ionel GARDAIS
What is the -Pd option for ?

I do a full co and it worked.

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] error in cvs tree

2003-11-12 Thread Juha Lindfors

cvs update -Pd ?

On Wed, 12 Nov 2003, Ionel GARDAIS wrote:

> Well,
> I've just updated for the n'th time the jboss-head and
> I get the same error.
>
> Should I try with a clean checkout ?
>
> ___
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
>
>
> ---
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] error in cvs tree

2003-11-12 Thread Ionel GARDAIS
Well,
I've just updated for the n'th time the jboss-head and
I get the same error.

Should I try with a clean checkout ?

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Jetty Thread Count: Recommendations?

2003-11-12 Thread Peter Luttrell
Each of our servers handles roughly 50k jsp pages + 450k other files
each day. We're using JBoss3.2.1 + Jetty 4.2.9.
Does anyone have a recommendation as to how many threads we should allow
Jetty to have? We've got it currently set to the default (100), but
periodicly we're running out of threads with the following error messages:
=2003-11-10 11:48:52,143 [Acceptor 
ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]] WARN 
[jbossweb] WARNING: No thread for 
Socket[addr=/127.0.0.1,port=48196,localport=8080]

(We're proxing through apache which is running on each machine, incase
you're wondering why it's 127.0.0.1.)
Here's the configuration we're using:


 
  

 
   
   10
   
   100
   3
   5000
 

  
..
thanks.
.peter


--
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,is for the sole 
use of the intended recipient(s), even if addressed incorrectly, and may contain 
confidential and privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not the intended recipient, please contact the 
sender by reply e-mail and destroy or delete all copies of the original message and 
all attachments, including deletion from the trash or equivalent folder.  Thank you.


Re: [JBoss-user] Load Balancing & Failover For JMX RMIAdapter - Solved - But One More Thing...

2003-11-12 Thread Nicholas
I figured out what I was doing wrong after some
drifting through the source code. Anyways, now it load
balances fine.

(Instead of sourceObject.getClass(), I used
org.jboss.jmx.adaptor.rmi.RMIAdaptor.class.)

However, I observed that when I tried to test the
failover by stopping one of my servers, the call to
the **stopping** server failed saying

Cause: javax.management.InstanceNotFoundException:
myDomain:name=SyncProcess is not registered.

Obviously the call went in after my MBean had been
unregistered, but before the RMI service had stopped.

Other than implementing a retry loop in the client,
can anyone recommend a solution to this ?

Thanks.

//Nicholas

--- Nicholas <[EMAIL PROTECTED]> wrote:
> I am trying to set up a cluster of MBean services
> where we have a set of custom MBeans. I would like
> to
> use load balancing and failover for the MBean
> clients,
> but it I realize that jmx/rmi/RMIAdaptor is not "HA
> ready".  (Using 3.2.1, 3.2.2 and 3.2.3RC1)
> 
> Reviewing the docs, I tried to implement this
> example:
> 
> HAPartition myPartition =
> (HAPartition)ctx.lookup(“/HAPartition/” +
> partitionName); 
> HARMIServer rmiserver = new
> HARMIServerImpl(myPartition, "MyService",
> MyService.class, myService); 
> MyService stub =
> (MyService)rmiserver.createHAStub(new
> RoundRobin());
> 
> I am not sure if this is the right way to go, but
> screw the torpedoes
> 
> The first thing I ran into is that although
> HARMIServerImpl implements createHAStub(), the
> interface HARMIServer does not. 
> 
> So I did this:
> 
> Object sourceObject =
> ctx.lookup("jmx/rmi/RMIAdaptor");
> HAPartition myPartition =
> (HAPartition)ctx.lookup("/HAPartition/" +
> partitionName);
> HARMIServer rmiserver = new
> HARMIServerImpl(myPartition, "HARMIAdaptor",
> sourceObject.getClass(), sourceObject);
> // Here I cast the HARMIServer to a HARMIServerImpl 
> org.jboss.jmx.adaptor.rmi.RMIAdaptor stub =
>
(org.jboss.jmx.adaptor.rmi.RMIAdaptor)((HARMIServerImpl)rmiserver).createHAStub(new
> RoundRobin());
> 
> Then I take the stub and bind it back into JNDI
> where
> I can retrieve it later.
> 
> Well it compiled fine..(famous last words), but
> at
> runtine I get this error:
> 
> java.lang.IllegalArgumentException: $Proxy25 is not
> an
> interface
> at
>
java.lang.reflect.Proxy.getProxyClass(Proxy.java:340)
> at
>
java.lang.reflect.Proxy.newProxyInstance(Proxy.java:552)
> at
>
org.jboss.ha.framework.server.HARMIServerImpl.createHAStub(HARMIServerImpl.java:184)
> at
>
com.adp.sbs.jboss.ha.HAExporter.start(HAExporter.java:58)
> 
> Am I going in the right direction ?
> 
> Thanks.
> 
> //Nicholas
> 
> 
>
---
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the
> latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/jboss-user


=
Nicholas Whitehead
Home: (973) 377 9335
Cell: (201) 615 2716
[EMAIL PROTECTED]
Get Your News From The Crowbar: http://crowbar.dnsalias.com:443/crowbar/


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Jetty Thread Count: Recommendations?

2003-11-12 Thread Peter Luttrell
Each of our servers handles roughly 50k jsp pages + 450k other files 
each day. We're using JBoss3.2.1 + Jetty 4.2.9.

Does anyone have a recommendation as to how many threads we should allow 
Jetty to have? We've got it currently set to the default (100), but 
periodicly we're running out of threads with the following error messages:

=2003-11-10 11:48:52,143 [Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080]] WARN [jbossweb] WARNING: No thread for Socket[addr=/127.0.0.1,port=48196,localport=8080]

(We're proxing through apache which is running on each machine, incase 
you're wondering why it's 127.0.0.1.)

Here's the configuration we're using:


 
  

 
   
   10
   
   100
   3
   5000
 

  
..

thanks.
.peter


--
CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,is for the sole 
use of the intended recipient(s), even if addressed incorrectly, and may contain 
confidential and privileged information.  Any unauthorized review, use, disclosure or 
distribution is prohibited.  If you are not the intended recipient, please contact the 
sender by reply e-mail and destroy or delete all copies of the original message and 
all attachments, including deletion from the trash or equivalent folder.  Thank you.


Re: [JBoss-user] error in cvs tree

2003-11-12 Thread Juha Lindfors

It worked for me today.

-- Juha

On Wed, 12 Nov 2003, Ionel GARDAIS wrote:

> hi,
>
> it's been a few days since the jboss-head build fails
> because of this error :
>
> BUILD FAILED
> file:C:/java/jboss/varia/build.xml:539: Deployment
> descriptor:
> C:\java\jboss\varia\output\resources\loadbalancer\web.xml
> does not exist.
>
> It seems that the loadbalancer directory is not in the
> src\resources tree.
> Can those who are in charge of the loadbalancer add
> this file ?
>
> thanks,
> ionel
>
> ___
> Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
> Yahoo! Mail : http://fr.mail.yahoo.com
>
>
> ---
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>
>




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] error in cvs tree

2003-11-12 Thread Ionel GARDAIS
hi,

it's been a few days since the jboss-head build fails
because of this error :

BUILD FAILED
file:C:/java/jboss/varia/build.xml:539: Deployment
descriptor:
C:\java\jboss\varia\output\resources\loadbalancer\web.xml
does not exist.

It seems that the loadbalancer directory is not in the
src\resources tree.
Can those who are in charge of the loadbalancer add
this file ?

thanks,
ionel

___
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] REPOST: Can an ear be used in user-service.xml MBeans?

2003-11-12 Thread Sasidharan, Manoj
Hello All,

Is it possible to use an ear file to create a custom MBean in JBoss 3.2.x
(*-service.xml)?

Thanks in advance for your time.

Best Regards
MS



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] How to write a custom MBean??

2003-11-12 Thread Sasidharan, Manoj
Hello All,

I am looking for some help on writing a custom MBean for JBoss 3.2.x. Can
somebody please help.

Any source/suggestions would be highly appreciated.

Thanks in advance for your help.

rgds
MS


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Load Balancing & Failover For JMX RMIAdapter

2003-11-12 Thread Nicholas
I am trying to set up a cluster of MBean services
where we have a set of custom MBeans. I would like to
use load balancing and failover for the MBean clients,
but it I realize that jmx/rmi/RMIAdaptor is not "HA
ready".  (Using 3.2.1, 3.2.2 and 3.2.3RC1)

Reviewing the docs, I tried to implement this example:

HAPartition myPartition =
(HAPartition)ctx.lookup(“/HAPartition/” +
partitionName); 
HARMIServer rmiserver = new
HARMIServerImpl(myPartition, "MyService",
MyService.class, myService); 
MyService stub = (MyService)rmiserver.createHAStub(new
RoundRobin());

I am not sure if this is the right way to go, but
screw the torpedoes

The first thing I ran into is that although
HARMIServerImpl implements createHAStub(), the
interface HARMIServer does not. 

So I did this:

Object sourceObject =
ctx.lookup("jmx/rmi/RMIAdaptor");
HAPartition myPartition =
(HAPartition)ctx.lookup("/HAPartition/" +
partitionName);
HARMIServer rmiserver = new
HARMIServerImpl(myPartition, "HARMIAdaptor",
sourceObject.getClass(), sourceObject);
// Here I cast the HARMIServer to a HARMIServerImpl 
org.jboss.jmx.adaptor.rmi.RMIAdaptor stub =
(org.jboss.jmx.adaptor.rmi.RMIAdaptor)((HARMIServerImpl)rmiserver).createHAStub(new
RoundRobin());

Then I take the stub and bind it back into JNDI where
I can retrieve it later.

Well it compiled fine..(famous last words), but at
runtine I get this error:

java.lang.IllegalArgumentException: $Proxy25 is not an
interface
at
java.lang.reflect.Proxy.getProxyClass(Proxy.java:340)
at
java.lang.reflect.Proxy.newProxyInstance(Proxy.java:552)
at
org.jboss.ha.framework.server.HARMIServerImpl.createHAStub(HARMIServerImpl.java:184)
at
com.adp.sbs.jboss.ha.HAExporter.start(HAExporter.java:58)

Am I going in the right direction ?

Thanks.

//Nicholas


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] upgrade from jboss 2.2/tomcat 3.3 to jboss 3.2.2

2003-11-12 Thread C King

I have a web application that was setup 3 years ago on Windows NT using Apache 1.3.9 as the web server and Jboss 2.2 integrated with Tomcat 3.2.1 for the JSPs, servlets, and EJBs on JDK 1.3.  The database server is Sybase Adaptive Server 12.5 on Windows NT.
 
I am attempting to upgrade the web/application servers on Windows 2000.  I installed J2sdk1.4.2, Apache httpd-2.0.47-win32 and extracted jboss 3.2.2.
 
Here is information about our old setup:
 
The old version of Jboss/Tomcat that we use did not require a .war file.  
 
The application jsps, html, xml, js, css files are under app\tomcat\webapps\ourapplication\
 
The file and directory structure where I added the database settings was app\jboss\config\tomcat\jboss.jcml
 
The jar files are under app\jboss\lib\ext and the ejbs jar file is under app\jboss\deploy.
 
The way we start the old application is to open a command prompt, go to c:\app\jboss\bin and run a run_with_tomcat.bat file. 
 
-
 
I have made a sybase-ds.xml file based on the example provided, added my database properties, and put it in the c:\jboss-3.2.2\server\default\deploy directory.
 
1.  Do I have to make a .war file of my application?  If not, where do I place the ourapplication folder?  I was guessing c:\jboss-3.2.2\server\default\deploy .
 
2.  Where do I place the jar files that were in app\jboss\lib\ext and app\jboss\deploy ?
 
3.  Do I need to modify the web.xml file in my application that was in app\tomcat\webapps\ourapplication\Web-inf\ ?
 
4.  Do I need to modify login-config.xml ?
 
5.  Do I need to configure anything to get tomcat to work with the application?
 
6.  Anything else I'm missing?
 
I realize I probably have a lot of work and reading to do.  I'm not sure what questions I need to be asking though.  I didn't setup the old system and mainly work with databases.
Any help you can provide would be appreciated.
Thanks,
Chris
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard

RE: [JBoss-user] ROOT.war

2003-11-12 Thread Robert Cauble
Sorry - I guess I didn't look hard enough.

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:jboss-user-
> [EMAIL PROTECTED] On Behalf Of Scott M Stark
> Sent: Wednesday, November 12, 2003 11:05 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] ROOT.war
> 
> The context-root jboss-web.xml element discussed (I guess too briefly)
> in chap 9 is the answer:
> 
> The context-root element allows one to specify the prefix under which
web
> application is located. This is only applicable to stand-alone web
> application
> deployment as a WAR file. Web applications included as part of an EAR
must
> set
> the root using the context-root element of the EAR application.xml
> descriptor.
> 
> example jboss-jmx-console.war/WEB-INF/jboss-web.xml:
> 
> 
>   
>   
> 
> 
> --
> 
> Scott Stark
> Chief Technology Officer
> JBoss Group, LLC
> 
> 
> Robert Cauble wrote:
> 
> > If I take jboss 3.2.2 out-of-the-box and rename
> > server/default/deploy/jmx-console.war to ROOT.war and I  try going
to
> > the url
> >
> > http://localhost:8080  I get a "HTTP Status
500
> > - No Content configured to process this request" response.
> >
> >
> >
> > I can then go to http://localhost:8080/ROOT and it works fine (goes
to
> > the jmx console as expected). What is the additional configuration I
> > need to do in order to define a root context? I couldn't find
anything
> > in the JBoss documentation which we purchased which describes how to
do
> > this.
> >
> >
> >
> > Any pointers here would be greatly appreciated.
> >
> >
> >
> > Thanks,
> >
> > Rob
> >
> 
> 
> 
> ---
> This SF.Net email sponsored by: ApacheCon 2003,
> 16-19 November in Las Vegas. Learn firsthand the latest
> developments in Apache, PHP, Perl, XML, Java, MySQL,
> WebDAV, and more! http://www.apachecon.com/
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] [CMP] using db default values when inserting record with entity bean

2003-11-12 Thread Alexey Loubyansky
No, it doesn't. In fact, read-only fields are not included in neither 
INSERT nor UPDATE. But that does not help you, probably.

Marek Lange wrote:

Alexey Loubyansky schrieb:

You have no other choice than initializing the fields in the 
ejbCreate. Not all databases allows you to skip values in INSERT.


Thanks for your answer Alex, I did it this way as there seemed to be no 
better solution. Setting db default values does not make sense in EJB then?

-marek




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] [CMP] using db default values when inserting record with entity bean

2003-11-12 Thread Marek Lange
Alexey Loubyansky schrieb:
You have no other choice than initializing the fields in the ejbCreate. 
Not all databases allows you to skip values in INSERT.
Thanks for your answer Alex, I did it this way as there seemed to be no 
better solution. Setting db default values does not make sense in EJB then?

-marek



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Alexey Loubyansky
Pedro Salazar wrote:

On Wed, 2003-11-12 at 16:30, Alexey Loubyansky wrote:

The store() is called each time when the synchronization should occur 
according to the spec.



The question is when and why the synchronization occurs?  Why is that the
JBOSS is requiring synchronization? Has the cluster option have anything
to do it? - However, I declared my entity beans as read-only...
I just looked at your original post:
 @jboss.persistence
 *   read-only="true"
This will set read-only in jbosscmp-jdbc.xml. To achieve the behaviour 
you want, i.e. instances should not be associated with tx and avoid 
sync, you need read-only in jboss.xml.

You should use
 * @jboss.read-only read-only="true"
This will put read-only in both jbosscmp-jdbc.xml and jboss.xml





---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Spurious fields in the SQL Insert of a EJB 2.0 bean with One-to-One relations

2003-11-12 Thread Percy Christian
Thanks again for your help.
Indeed that doctype definition is missing!
I will add it and try the key trick and report later on the result
Thanks again
Christian



From: Alexey Loubyansky <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Spurious fields in the SQL Insert of a EJB 2.0 
bean with One-to-One relations
Date: Wed, 12 Nov 2003 13:39:25 +0200

Percy Christian wrote:

Thanks for your kind support.

Here is the insert SQL
INSERT INTO CONTACT (CONTACT_ID, NAME, ADDRESS, TEL1, TEL2, TEL3, GSM, 
FAX, EMAIL, URL, IBAN_CODE, BIC, COMMENTS, CREATION_DATE, LOCALITY_ID, 
Manufacturer_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)

And yes it deploys correctly without errors.
Does the jbosscmp-jdbc.xml have the doctype definition?
http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd";>

Could you give me a hint on what and how to change the XML file to make it 
compliant?
jbosscmp-jdbc_3_2.dtd

An example of a One-To-One relation with only  on one side 
would be extra super.
Many many thanks.
Try to add an empty  element for the ejb-relationship-role in 
jbosscmp-jdbc.xml that does not have key-fields element.

I can even define the an  element in the 
 element that has no  element in the 
jbosscmp-jdbc.xml file

Like this:
Here is the XML entry from the ejb-jar XML file
   
   manufacturer-contact
   
   manufacturer
   
ManufacturerRelationshipRole

   One
   
   manufacturer
   Manufacturer
   
   
   contact
   contact
   
   
   
   contact
   
ContactRelationshipRole

   One
   
   contact
   Contact
   
   
manufacturer 
manufacturer 
   
   
   
The the insert SQL changes to
INSERT INTO CONTACT (CONTACT_ID, NAME, ADDRESS, TEL1, TEL2, TEL3, GSM, 
FAX, EMAIL, URL, IBAN_CODE, BIC, COMMENTS, CREATION_DATE, LOCALITY_ID, 
manufacturer) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?)




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
_
MSN Search, for relevant search results! http://search.msn.be


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Number of active EJBs

2003-11-12 Thread Podgaetsky, Genady



Hi
I'm trying to get 
started with EjB on JBoss and wondering can I get a number of active 
EJB's?
I looked at the JMX 
console and saw no details under jndiName=EJBName,service=EJB 

Can anyone elaborate 
on this?
Thanks,
Genady

NOTICE: This communication contains information which may be proprietary, privileged or confidential. If you are not the intended recipient (or authorized to receive for the intended recipient), or believe that you have received this communication in error, please do not print, copy, retransmit, disseminate, disclose or otherwise use the information. Also, please indicate to the sender that you have received this communication in error and delete the copy you received. Thank you.


Re: [JBoss-user] [CMP] using db default values when inserting record with entity bean

2003-11-12 Thread Alexey Loubyansky
Marek Lange wrote:

I have defined some default values in my database. They should be used 
when a table record is inserted and the corresponding field is missing 
in the ejb call.

This was my understanding of doing this with ejbCreate():
If I want the default value to be used, the record is inserted via an 
ejbCreate() method where the field is missing. However, doing this, the 
db field is still empty after the insert and no default value was 
created for that field.
It's expected.

I tried to discover the insert statement but the DEBUG mode of 
org.jboss.ejb.plugins.cmp does only show SELECT queries.
It's incorrect.

But I am pretty 
sure that JBoss inserts NULL for this field (what prevents the da to set 
the default value).
It's correct.

Any hints? Is this a JBoss configuration issue?
You have no other choice than initializing the fields in the ejbCreate. 
Not all databases allows you to skip values in INSERT.

Thanks,

-marek



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Pedro Salazar
On Wed, 2003-11-12 at 16:30, Alexey Loubyansky wrote:
> The store() is called each time when the synchronization should occur 
> according to the spec.
> 

The question is when and why the synchronization occurs? Why is that the
JBOSS is requiring synchronization? Has the cluster option have anything
to do it? - However, I declared my entity beans as read-only...
-- 
-PS



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] ROOT.war

2003-11-12 Thread Scott M Stark
The context-root jboss-web.xml element discussed (I guess too briefly)
in chap 9 is the answer:
The context-root element allows one to specify the prefix under which web 
application is located. This is only applicable to stand-alone web application 
deployment as a WAR file. Web applications included as part of an EAR must set 
the root using the context-root element of the EAR application.xml descriptor.

example jboss-jmx-console.war/WEB-INF/jboss-web.xml:





--

Scott Stark
Chief Technology Officer
JBoss Group, LLC

Robert Cauble wrote:

If I take jboss 3.2.2 out-of-the-box and rename 
server/default/deploy/jmx-console.war to ROOT.war and I  try going to 
the url

http://localhost:8080  I get a “HTTP Status 500 
– No Content configured to process this request” response.

 

I can then go to http://localhost:8080/ROOT and it works fine (goes to 
the jmx console as expected). What is the additional configuration I 
need to do in order to define a root context? I couldn’t find anything 
in the JBoss documentation which we purchased which describes how to do 
this.

 

Any pointers here would be greatly appreciated.

 

Thanks,

Rob



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] server vs client Sun VM

2003-11-12 Thread Yates, Danny
Title: Message



Putting:
 
  
"server vm" "client vm" site:java.sun.com
 
into 
Google provides some useful points to start with.
 
-- 
Danny Yates

  
  -Original Message-From: Brian McSweeney 
  [mailto:[EMAIL PROTECTED] Sent: 12 November 2003 
  16:36To: [EMAIL PROTECTED]Subject: 
  [JBoss-user] server vs client Sun VM
  
  Sorry if 
  this is a bit off topic,
   
  But does 
  anyone have experience with running jboss using the 
  sun jvm in client vs 
  server mode.
   
  I 
  presume I should be running in server mode, but I'm wondering if anyone knows 
  if there is a performance difference.
  I'm 
  using jdk1.4.2
   
   
  Thanks,
  Brian


RE: [JBoss-user] optimize question

2003-11-12 Thread Yates, Danny
I think you are mis-reading the documentation. My (maybe incorrect)
understanding 
is that commit option A causes the instance to be cached inside JBoss
between
uses (which is what your quote says). This corresponds with the original
poster's
requirements.

-- 
Danny Yates


-Original Message-
From: Olve S. Hansen [mailto:[EMAIL PROTECTED] 
Sent: 12 November 2003 15:56
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] optimize question


[EMAIL PROTECTED] wrote:

>Hi all,
>
>I have modifieed my beans as follows in the deployment descriptor 
>(jboss.xml):
>
>  
>
[snip]

>I also switched to commit option 'A', because the container is the only 
>application modifying the database data:
>
>
>   
>CMP 2.x and Cache
>A
>   
>
>
>  
>
Look at the pay-for documentation for jboss page 290, or page 264 in the 
EJB 2.0 spec from sun.
Commit option A means that:
*For commit-option 'A', this instance is cached and used between 
transactions.

*For commit-optoin 'B', this instance is cached and used between 
transactions, but is marked as 'dirty' at the end of a transaction. This 
means that at the start of a new transaction ejbLoad must be called.

*For commit-option 'C', this instance is marked as 'dirty', released 
from the cache, and marked for passivation at the end of a transaction.

And the JBoss specific:
*For commit-option 'D', a background refresh thread periodically calls 
ejbLoad on stale beans within the cache. Otherwise, this option works in 
the same way as 'A'.

This means that the commit-option a is the one requiring most DB 
lookups. We switched from A to B and now only the first big lookups take 
time, the following DB requests are retrieved from the cache.

Option B and C means that the DB can be in inconsisten states, since the 
updated version are in the JBoss cahce only. This also means that the 
only DB updates happening should run through your JBoss app.

Hope this helps..

Regards,
Olve



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] ROOT.war

2003-11-12 Thread Yates, Danny
Title: Message



Have 
you typed "JBoss ROOT.war" into Google?
 
You 
need to either:
 
a) Add 
a JBoss-specific descriptor (jboss-web.xml) to your WAR file which describes the 
context root ("/"), or
b) 
Package your WAR inside an EAR and follow the EAR spec for specifying the 
context root
 
-- 
Danny Yates

  
  -Original Message-From: Robert Cauble 
  [mailto:[EMAIL PROTECTED] Sent: 12 November 2003 
  16:36To: [EMAIL PROTECTED]Subject: 
  [JBoss-user] ROOT.war
  
  If I take jboss 3.2.2 out-of-the-box and rename server/default/deploy/jmx-console.war to ROOT.war and I  try going to the url
  http://localhost:8080 I get a "HTTP Status 
  500 - No Content configured to process this request" 
  response.
   
  I can then go to http://localhost:8080/ROOT and it works 
  fine (goes to the jmx console as expected). What is 
  the additional configuration I need to do in order to define a root context? I 
  couldn't find anything in the JBoss documentation 
  which we purchased which describes how to do this. 
  
   
  Any pointers here would be greatly 
  appreciated.
   
  Thanks,
  Rob


Re: [JBoss-user] optimize question

2003-11-12 Thread Alexey Loubyansky
You are correct. Just read the comments from the spec Olve posted.

Brian McSweeney wrote:
I must say, I understood it to be the total opposite. I thought commit
option A requires the least number of db lookups because it's all in the
jboss cache. Please correct me if I am wrong.


This means that the commit-option a is the one requiring most DB 
lookups. We switched from A to B and now only the first big lookups
take 

time, the following DB requests are retrieved from the cache.


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Olve S.
Hansen
Sent: 12 November 2003 15:56
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] optimize question
[EMAIL PROTECTED] wrote:


Hi all,

I have modifieed my beans as follows in the deployment descriptor 
(jboss.xml):



[snip]


I also switched to commit option 'A', because the container is the only


application modifying the database data:


 
  CMP 2.x and Cache
  A
 



Look at the pay-for documentation for jboss page 290, or page 264 in the

EJB 2.0 spec from sun.
Commit option A means that:
.For commit-option 'A', this instance is cached and used between 
transactions.

.For commit-optoin 'B', this instance is cached and used between 
transactions, but is marked as 'dirty' at the end of a transaction. This

means that at the start of a new transaction ejbLoad must be called.

.For commit-option 'C', this instance is marked as 'dirty', released 
from the cache, and marked for passivation at the end of a transaction.

And the JBoss specific:
.For commit-option 'D', a background refresh thread periodically calls 
ejbLoad on stale beans within the cache. Otherwise, this option works in

the same way as 'A'.

This means that the commit-option a is the one requiring most DB 
lookups. We switched from A to B and now only the first big lookups take

time, the following DB requests are retrieved from the cache.

Option B and C means that the DB can be in inconsisten states, since the

updated version are in the JBoss cahce only. This also means that the 
only DB updates happening should run through your JBoss app.

Hope this helps..

Regards,
Olve


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] ROOT.war

2003-11-12 Thread Robert Cauble








If I take jboss 3.2.2 out-of-the-box
and rename server/default/deploy/jmx-console.war to ROOT.war and I  try going to the url

http://localhost:8080 I
get a “HTTP Status 500 – No Content configured to process this
request” response.

 

I can then go to http://localhost:8080/ROOT
and it works fine (goes to the jmx console as
expected). What is the additional configuration I need to do in order to define
a root context? I couldn’t find anything in the JBoss
documentation which we purchased which describes how to do this. 

 

Any pointers here would be greatly appreciated.

 

Thanks,

Rob








[JBoss-user] server vs client Sun VM

2003-11-12 Thread Brian McSweeney








Sorry if this is a bit off
topic,

 

But does anyone have
experience with running jboss using the sun jvm in client vs server mode.

 

I presume I should be running
in server mode, but I’m wondering if anyone knows if there is a performance
difference.

I’m using jdk1.4.2

 

 

Thanks,

Brian








Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Alexey Loubyansky
The store() is called each time when the synchronization should occur 
according to the spec.

Pedro Salazar wrote:

On Wed, 2003-11-12 at 14:07, Alexey Loubyansky wrote:

It should be the same in 3.2.2



I may have understood it wrong but do you mean that entity beans CMP
always call the store() to do some business code even the
synchronization by container won't occur, and creating a cpu waste time
like a point if bottle neck? 

And it happens in all jboss 3.2.x releases?




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] optimize question

2003-11-12 Thread Brian McSweeney

I must say, I understood it to be the total opposite. I thought commit
option A requires the least number of db lookups because it's all in the
jboss cache. Please correct me if I am wrong.


>This means that the commit-option a is the one requiring most DB 
>lookups. We switched from A to B and now only the first big lookups
take 
>time, the following DB requests are retrieved from the cache.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Olve S.
Hansen
Sent: 12 November 2003 15:56
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] optimize question

[EMAIL PROTECTED] wrote:

>Hi all,
>
>I have modifieed my beans as follows in the deployment descriptor 
>(jboss.xml):
>
>  
>
[snip]

>I also switched to commit option 'A', because the container is the only

>application modifying the database data:
>
>
>   
>CMP 2.x and Cache
>A
>   
>
>
>  
>
Look at the pay-for documentation for jboss page 290, or page 264 in the

EJB 2.0 spec from sun.
Commit option A means that:
.For commit-option 'A', this instance is cached and used between 
transactions.

.For commit-optoin 'B', this instance is cached and used between 
transactions, but is marked as 'dirty' at the end of a transaction. This

means that at the start of a new transaction ejbLoad must be called.

.For commit-option 'C', this instance is marked as 'dirty', released 
from the cache, and marked for passivation at the end of a transaction.

And the JBoss specific:
.For commit-option 'D', a background refresh thread periodically calls 
ejbLoad on stale beans within the cache. Otherwise, this option works in

the same way as 'A'.

This means that the commit-option a is the one requiring most DB 
lookups. We switched from A to B and now only the first big lookups take

time, the following DB requests are retrieved from the cache.

Option B and C means that the DB can be in inconsisten states, since the

updated version are in the JBoss cahce only. This also means that the 
only DB updates happening should run through your JBoss app.

Hope this helps..

Regards,
Olve



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] [CMP] using db default values when inserting record with entity bean

2003-11-12 Thread Marek Lange
I have defined some default values in my database. They should be used 
when a table record is inserted and the corresponding field is missing 
in the ejb call.

This was my understanding of doing this with ejbCreate():
If I want the default value to be used, the record is inserted via an 
ejbCreate() method where the field is missing. However, doing this, the 
db field is still empty after the insert and no default value was 
created for that field.

I tried to discover the insert statement but the DEBUG mode of 
org.jboss.ejb.plugins.cmp does only show SELECT queries. But I am pretty 
sure that JBoss inserts NULL for this field (what prevents the da to set 
the default value).

Any hints? Is this a JBoss configuration issue?

Thanks,

-marek



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Pedro Salazar
On Wed, 2003-11-12 at 14:07, Alexey Loubyansky wrote:
> It should be the same in 3.2.2
> 

I may have understood it wrong but do you mean that entity beans CMP
always call the store() to do some business code even the
synchronization by container won't occur, and creating a cpu waste time
like a point if bottle neck? 

And it happens in all jboss 3.2.x releases?


> Pedro Salazar wrote:
> 
> > On Wed, 2003-11-12 at 12:23, Alexey Loubyansky wrote:
> > 
> >>It is called but the synchronization does not occur, right?
> >>Till the 3.2.2 it was not easy to avoid this. I'll look at it.
> > 
> > 
> > Alexey,
> > 
> > I tried on 3.2.1 but since you have referred that issue I'll try the
> > 3.2.2.
-- 
-PS



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] optimize question

2003-11-12 Thread Olve S. Hansen
[EMAIL PROTECTED] wrote:

Hi all,

I have modifieed my beans as follows in the deployment descriptor 
(jboss.xml):

 

[snip]

I also switched to commit option 'A', because the container is the only 
application modifying the database data:


  
   CMP 2.x and Cache
   A
  

 

Look at the pay-for documentation for jboss page 290, or page 264 in the 
EJB 2.0 spec from sun.
Commit option A means that:
•For commit-option ‘A’, this instance is cached and used between 
transactions.

•For commit-optoin ‘B’, this instance is cached and used between 
transactions, but is marked as ‘dirty’ at the end of a transaction. This 
means that at the start of a new transaction ejbLoad must be called.

•For commit-option ‘C’, this instance is marked as ‘dirty’, released 
from the cache, and marked for passivation at the end of a transaction.

And the JBoss specific:
•For commit-option ‘D’, a background refresh thread periodically calls 
ejbLoad on stale beans within the cache. Otherwise, this option works in 
the same way as ‘A’.

This means that the commit-option a is the one requiring most DB 
lookups. We switched from A to B and now only the first big lookups take 
time, the following DB requests are retrieved from the cache.

Option B and C means that the DB can be in inconsisten states, since the 
updated version are in the JBoss cahce only. This also means that the 
only DB updates happening should run through your JBoss app.

Hope this helps..

Regards,
Olve


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] optimize question

2003-11-12 Thread Rafal Kedziorski
hi,

I think, You have to change

600 -> means 600 seconds

which is defined by default in standardjboss.xml.

Regards,
Rafal
At 15:36 12.11.2003, [EMAIL PROTECTED] wrote:
Hi all,

I have modifieed my beans as follows in the deployment descriptor
(jboss.xml):

   Relation
   Relation
   
   
  get*
 true
  
   

I also switched to commit option 'A', because the container is the only
application modifying the database data:

   
CMP 2.x and Cache
A
   

I turned on DEBUG info on (org.jboss.ejb.plugins.cmp) using the log4j.xml
file, so I can see the SQL generated:
 
 
 
 
Then I my application. On each invocation of my methods I still see the
following SQL generated:
15:29:08,938 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT
relationId FROM Relation WHERE relationId=?
15:29:08,942 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT
relationId FROM Relation WHERE relationId=?
15:29:08,947 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT
relationId FROM Relation WHERE relationId=?
15:29:08,951 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT
relationId FROM Relation WHERE relationId=?
As you can see this is a finder method which does no database modifying
what so ever.
So I assumed JBoss could get this from cache. Why is this SQL still
required?
Thanks a lot,

Regards,

Harm de Laat
Informatiefabriek
The Netherlands




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Deployment warning on jboss 3.2.2RC3

2003-11-12 Thread Pedro Salazar
On Wed, 2003-08-27 at 11:23, Christofer Dutz wrote:
> I have found the solution to my deployment warnings and 
> load-balancing problems.
> 
> I simply forgot to set the configuration-name to "Clustered CMP 2.x EntityBean"
> 
> I could punch myself for this. Now everythng is working fine. 
> Now I can cun the benchmark with extremly higher injection-rates ...
> 
> Thanx once again,
> 
> Chris
> 
> 

Hi,

could you explain me what changes have you done? I'm not quite sure about the 
configuration-name you have referred. 

I just upgraded jboss from 3.2.1 to 3.2.2 and the warning messages
started to appear!?

regards,
Pedro Salazar.

> 
> Zitat von Christofer Dutz <[EMAIL PROTECTED]>:
> 
> > Unfortunately that didn't help. The Messages are still the same.
> > I have read in the current Jboss 3.2.x docs that there is something called
> > detached invokers (funny I haven't heard from them bevore).
> > 
> > The book is telling me that I have to configure invokers with a
> >  tag in jboss.xml
> > After studying the detached invoker Chapter a little, I have to admint,
> > I am quite confused.
> > Mabe I should have a night of sleep and try it again tomorow.
> > Or does anyone in this list have tip for me to get me started ?
> > 
> > Is there a how-to that tells me "How to make an Application Cluster-Aware"
> > 
> > Chris
> > 
> > Bill Burke wrote:
> > 
> > > You have to run with the 'all' configuraiton
> > >
> > > run.sh -c all
> > >
> > > Bill
> > >
> > > Christofer Dutz wrote:
> > >
> > >> Hi,
> > >> I am geting some strange warnings on RC3 with my application. The 
> > >> warning has
> > >> the folowing text:
> > >> WARN  [org.jboss.ejb.EntityContainer] *** EJB 'OrderLineEnt' deployed as
> > >> CLUSTERED but not a single clustered-invoker is bound to container ***
> > >>
> > >> At first I thought this was because of the container being the first 
> > >> in the line
> > >> to start, but all other cluster nodes show this message.
> > >>
> > >> Could this be the reason why I have this strange load-distribution 
> > >> (100% CPU
> > >> usage on one machine and 30% on all other nodes) on the cluster.
> > >>
> > >> What else do I have to do for seting up the beans as clustered 
> > >> Entities ?
> > >>
> > >>
> > >> Christofer Dutz
> > >>
-- 
-PS



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] optimize question

2003-11-12 Thread harm
Hi all,

I have modifieed my beans as follows in the deployment descriptor 
(jboss.xml):


   Relation
   Relation

   
   
  get*
 true
  
   


I also switched to commit option 'A', because the container is the only 
application modifying the database data:


   
CMP 2.x and Cache
A
   



I turned on DEBUG info on (org.jboss.ejb.plugins.cmp) using the log4j.xml 
file, so I can see the SQL generated:

 
 
 
 


Then I my application. On each invocation of my methods I still see the 
following SQL generated:

15:29:08,938 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT 
relationId FROM Relation WHERE relationId=?
15:29:08,942 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT 
relationId FROM Relation WHERE relationId=?
15:29:08,947 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT 
relationId FROM Relation WHERE relationId=?
15:29:08,951 DEBUG [Relation#findByPrimaryKey] Executing SQL: SELECT 
relationId FROM Relation WHERE relationId=?

As you can see this is a finder method which does no database modifying 
what so ever. 
So I assumed JBoss could get this from cache. Why is this SQL still 
required? 

Thanks a lot,

Regards,

Harm de Laat
Informatiefabriek
The Netherlands






---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Alexey Loubyansky
It should be the same in 3.2.2

Pedro Salazar wrote:

On Wed, 2003-11-12 at 12:23, Alexey Loubyansky wrote:

It is called but the synchronization does not occur, right?
Till the 3.2.2 it was not easy to avoid this. I'll look at it.


Alexey,

I tried on 3.2.1 but since you have referred that issue I'll try the
3.2.2.




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Pedro Salazar
On Wed, 2003-11-12 at 12:23, Alexey Loubyansky wrote:
> It is called but the synchronization does not occur, right?
> Till the 3.2.2 it was not easy to avoid this. I'll look at it.

Alexey,

I tried on 3.2.1 but since you have referred that issue I'll try the
3.2.2.
-- 
-PS



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] (no subject)

2003-11-12 Thread Alexey Loubyansky
[EMAIL PROTECTED] wrote:
Hi all,

I have been following the thread started by Pedro Salazar.

jboss.xml:

   
  
 CorrectionFile
 CorrectionFile
   True


  
   

Am I correct in the following assumption:

By default this entity bean has a transaction-type of: "Required".
correct

When a getter is called, this bean is not locked within a transcation.
correct

When a setter is called, this bean is locked within a transaction.
No, it is not. BTW, what is the point to call a setter on a read-only bean?



Thanks,

Regards,

Harm de Laat
Informatiefabriek
The Netherlands
=



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] (no subject)

2003-11-12 Thread harm
Hi all,

I have been following the thread started by Pedro Salazar.

jboss.xml:

   
  
 CorrectionFile
 CorrectionFile
   True


  
   


Am I correct in the following assumption:

By default this entity bean has a transaction-type of: "Required".
When a getter is called, this bean is not locked within a transcation.
When a setter is called, this bean is locked within a transaction.


Thanks,

Regards,

Harm de Laat
Informatiefabriek
The Netherlands



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Alexey Loubyansky
It is called but the synchronization does not occur, right?
Till the 3.2.2 it was not easy to avoid this. I'll look at it.
Pedro Salazar wrote:

Greetings,

Why is that my entity beans are always calling the ejbStore() (I put
there a print message to watch) when I'm not updating none of them? I
even put the jboss.persistence the tag read-only to "true"!!!
 @jboss.persistence
 *   datasource="java:/OracleDS"
 *   datasource-mapping="Oracle9i"
 *   create-table="false" 
 *   remove-table="false"
 *   read-only="true"
 *   pk-constraint="true"
 *   table-name="uif_service"
 *   row-locking="false"
 *   read-time-out="300"
 *   list-cache-max="1000"

I would like that those entity beans make cache and avoid that always
going synchronizing to database when nothing occurs.
I pretend also to put them to read-only and when I update them through a
JDBC stored procedure, make something to invalidate the cache or using
the most read-only polite (some for RW and others for RO).
Any ideas why is it calling always the ejbStore()?

thanks,
Pedro Salazar.




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] log analyse

2003-11-12 Thread konf
Hallo,
what do you use for log analysing in JBoss? Is there something in java or
it is better to use webalizer?

Thanks, Jiri


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] Entity beans (CMP) are always calling ejbStore()

2003-11-12 Thread Pedro Salazar
Greetings,

Why is that my entity beans are always calling the ejbStore() (I put
there a print message to watch) when I'm not updating none of them? I
even put the jboss.persistence the tag read-only to "true"!!!

 @jboss.persistence
 *   datasource="java:/OracleDS"
 *   datasource-mapping="Oracle9i"
 *   create-table="false" 
 *   remove-table="false"
 *   read-only="true"
 *   pk-constraint="true"
 *   table-name="uif_service"
 *   row-locking="false"
 *   read-time-out="300"
 *   list-cache-max="1000"

I would like that those entity beans make cache and avoid that always
going synchronizing to database when nothing occurs.

I pretend also to put them to read-only and when I update them through a
JDBC stored procedure, make something to invalidate the cache or using
the most read-only polite (some for RW and others for RO).

Any ideas why is it calling always the ejbStore()?

thanks,
Pedro Salazar.
-- 
-PS



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Spurious fields in the SQL Insert of a EJB 2.0 bean with One-to-One relations

2003-11-12 Thread Alexey Loubyansky
Percy Christian wrote:

Thanks for your kind support.

Here is the insert SQL
INSERT INTO CONTACT (CONTACT_ID, NAME, ADDRESS, TEL1, TEL2, TEL3, GSM, 
FAX, EMAIL, URL, IBAN_CODE, BIC, COMMENTS, CREATION_DATE, LOCALITY_ID, 
Manufacturer_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?, ?)

And yes it deploys correctly without errors.
Does the jbosscmp-jdbc.xml have the doctype definition?
http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd";>

Could you give me a hint on what and how to change the XML file to make 
it compliant?
jbosscmp-jdbc_3_2.dtd

An example of a One-To-One relation with only  on one side 
would be extra super.
Many many thanks.
Try to add an empty  element for the ejb-relationship-role 
in jbosscmp-jdbc.xml that does not have key-fields element.

I can even define the an  element in the 
 element that has no  element in the 
jbosscmp-jdbc.xml file

Like this:
Here is the XML entry from the ejb-jar XML file
   
   manufacturer-contact
   
   manufacturer
   
ManufacturerRelationshipRole 

   One
   
   manufacturer
   Manufacturer
   
   
   contact
   contact
   
   
   
   contact
   
ContactRelationshipRole 

   One
   
   contact
   Contact
   
   
manufacturer 
manufacturer 
   
   
   
The the insert SQL changes to
INSERT INTO CONTACT (CONTACT_ID, NAME, ADDRESS, TEL1, TEL2, TEL3, GSM, 
FAX, EMAIL, URL, IBAN_CODE, BIC, COMMENTS, CREATION_DATE, LOCALITY_ID, 
manufacturer) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?)




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] Problem with SQL query for MySQL

2003-11-12 Thread Alexey Loubyansky
As far as I remember, Rafal's problem was "no space after table name". 
What's your problem? I just executed your DDL in MySql w/o problems.

Paul Ekeland wrote:
Hello,

I have exactly the same problem as Rafal, but with the following 
JBoss-generated query:
"CREATE TABLE user (user_id INTEGER NOT NULL,login VARCHAR(250) BINARY,
password_ VARCHAR(250) BINARY, first_name VARCHAR(250) BINARY, last_name 
VARCHAR(250) BINARY, gender VARCHAR(250) BINARY, email VARCHAR(250) 
BINARY, school_id INTEGER, CONSTRAINT pk_user PRIMARY KEY (user_id))"

I downloaded the latest JBoss 3.2.3RC1, released today but unfortunately 
with the same result..
Were your modification taken in account in this release or is it a 
different problem?
Thanks,

Paul


Branch_3_2


Rafal Kedziorski wrote:
 > At 20:24 28.10.2003 +0200, Alexey Loubyansky wrote:
 > >> It is fixed now.
 > > > In main cvs branch?
 > > > Regards,
 > Rafal
 > > >> alex
 >>
 >> Rafal Kedziorski wrote:
 >>
 >>> hi,
 >>> I'm using MySQL 4.0.13 and 4.0.14 (4.0.16 I will test tomorrow) and 
 >>> JBoss 3.2.2. And I have problems with this query (generated by JBoss):
 >>> insert into user(class_id, retail_id, mandant_id, language_id, >>> 
user_data_id, nickname, login_name, password, status, creation_date, >>> 
last_login_date) values ('35F7A660096411D89BC0D1907F01', '1234', >>> 
2, 1, null, null, '[EMAIL PROTECTED]', 'demo', 8, '2003-10-28 >>> 17:31:36', 
null)
 >>> but the same query with space after user
 >>> insert into user (class_id, retail_id, mandant_id, language_id, >>> 
user_data_id, nickname, login_name, password, status, creation_date, >>> 
last_login_date) values ('35F7A660096411D89BC0D1907F01', '1234', >>> 
2, 1, null, null, '[EMAIL PROTECTED]', 'demo', 8, '2003-10-28 >>> 17:31:36', 
null)
 >>> works.
 >>> This exception is shown:
 >>> 17:31:36,406 ERROR [UserEntityBean] Could not create entity >>> 
java.sql.SQLException: Syntax error or access violation,  message >>> 
from server: "You have an error in your SQL syntax.  Check the manual 
 >>> that corresponds to your MySQL server version for the right syntax 
to >>> use near 'user(class_id, retail_id, mandant_id, language_id, >>> 
user_data_id" at >>> 
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651) at >>> 
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889) at >>> 
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956) at >>> 
com.mysql.jdbc.Connection.execSQL(Connection.java:1874) at >>> 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1700 
 >>> ) at >>> 
com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1569 
 >>> ) at >>>
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:321) 

 >>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand.executeInsert(JDBCMySQLCreateCommand.java:66) 

 >>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.performInsert(JDBCAbstractCreateCommand.java:295) 

 >>> at >>>
org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execute(JDBCAbstractCreateCommand.java:144) 

 >>> at >>> 
org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(JDBCStoreManager.java:518) 

 >>> at >>>
org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPersistenceManager.java:208) 
 >>> at >>>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.createEntity(CachedConnectionInterceptor.java:269) 

 >>> at >>> 
org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.java:580) 
 >>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native >>> 
Method)  at >>> 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
 >>> at >>> 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 
 >>> at java.lang.reflect.Method.invoke(Method.java:324) at >>>
org.jboss.ejb.EntityContainer$ContainerInterceptor.invokeHome(EntityContainer.java:1042) 
 >>> at >>> 
org.jboss.ejb.plugins.AbstractInterceptor.invokeHome(AbstractInterceptor.java:88) 
 >>> at >>>
org.jboss.ejb.plugins.EntitySynchronizationInterceptor.invokeHome(EntitySynchronizationInterceptor.java:197) 

 >>> at >>>
org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invokeHome(CachedConnectionInterceptor.java:214) 

 >>>
 >>> ...
 >>>
 >>> Regards,
 >>> Rafal
 >>>
 >>> ---
 >>> This SF.net email is sponsored by: SF.net Giveback Program.
 >>> Does SourceForge.net help you be more productive?  Does it
 >>> help you create better code?   SHARE THE LOVE, and help us help
 >>> YOU!  Click Here: http://sourceforge.net/donate/
 >>> ___
 >>> JBoss-user mailing list
 >>> [EMAIL PROTECTED]
 >>> https://lists.sourceforge.net/lists/listinfo/jboss-user
 >>
 >>
 >>
 >>
 >>
 >> ---
 >> This SF.net email is sponsored by: SF.net Giveb

[JBoss-user] Can an ear be used for -service.xml MBeans?

2003-11-12 Thread Sasidharan, Manoj
Hello All,,

Is it possible to use an ear file to create a custom MBean in JBoss 3.2.x
(-service.xml)?

Please advice. 

Thanks in advance and Best Regards
MS


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] RE: Virtual Directory creation for Jboss-Done

2003-11-12 Thread Ivaturi,Srinivas
Hi Scott


Thanks for your Help and I am able to create Virtual Directory and access required. I 
have posted the same in several different forums you are the only one to reply my 
question. (Jboss, JavaRanch)


Thanks
Srinivas Ivaturi


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] 3.2.3RC1 available

2003-11-12 Thread Phil Shrimpton
On Wednesday 12 November 2003 04:15, Scott M Stark wrote:

Hi,

> Dec 1 is the target date.

Super, thanks

Phil

-- 
  9:13am  up 64 days, 11:23,  1 user,  load average: 0.43, 0.28, 0.19
ICQ: 760757 | AIM: pjshrimpton | Y!: pjshrimpton | [EMAIL PROTECTED]


---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


Re: [JBoss-user] MORE: PostgreSQL and NOT NULL integer fields

2003-11-12 Thread Mykola A. Nickishov
On Fri, Oct 31, 2003 at 03:31:45PM -0200, Ivens Porto wrote:

> Doing more tests I came to a situation that I cannot get out.
> 
> When creating a bean on the N side of the relation I'm getting the
> exception: 
> 
> java.sql.SQLException: ERROR:  ExecInsert: Fail to add null value in not
> null attribute movieid
> 
> This is expected, as the fk field is of type SERIAL, that in Postgresql
> is has modifier "not null", and the fk field is only set after
> ejbPostCreate().
> 
> Then I configured the container with  to
> true, but then when I create a bean on the N side of the relation and
> set it's relation with the 1 side on ejbPostCreate(), I get the
> following exception: 
> 
> 14:20:42,391 ERROR [STDERR] javax.ejb.CreateException: Primary key for
> created instance is null.
> 
> 
> Can anyone tell me what should I do???

What about create fk field as: 

CREATE TABLE ... (
... INTEGER NOT NULL REFERENCES ... (id) DEFERRABLE INITIALLY DEFERRED,
);
 ^

-- 
MAN-UANIC


pgp0.pgp
Description: PGP signature


Re: [JBoss-user] Spurious fields in the SQL Insert of a EJB 2.0 bean with One-to-One relations

2003-11-12 Thread Percy Christian
Thanks for your kind support.

Here is the insert SQL
INSERT INTO CONTACT (CONTACT_ID, NAME, ADDRESS, TEL1, TEL2, TEL3, GSM, FAX, 
EMAIL, URL, IBAN_CODE, BIC, COMMENTS, CREATION_DATE, LOCALITY_ID, 
Manufacturer_contact) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?, ?, ?, ?)

And yes it deploys correctly without errors.
Could you give me a hint on what and how to change the XML file to make it 
compliant?
An example of a One-To-One relation with only  on one side would 
be extra super.
Many many thanks.

I can even define the an  element in the  
element that has no  element in the jbosscmp-jdbc.xml file

Like this:
Here is the XML entry from the ejb-jar XML file
   
   manufacturer-contact
   
   manufacturer
   
ManufacturerRelationshipRole
   One
   
   manufacturer
   Manufacturer
   
   
   contact
   contact
   
   
   
   contact
   
ContactRelationshipRole
   One
   
   contact
   Contact
   
   
manufacturer 
manufacturer 
   
   
   

The the insert SQL changes to
INSERT INTO CONTACT (CONTACT_ID, NAME, ADDRESS, TEL1, TEL2, TEL3, GSM, FAX, 
EMAIL, URL, IBAN_CODE, BIC, COMMENTS, CREATION_DATE, LOCALITY_ID, 
manufacturer) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?, ?)


From: Alexey Loubyansky <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: Re: [JBoss-user] Spurious fields in the SQL Insert of a EJB 2.0 
bean with One-to-One relations
Date: Tue, 11 Nov 2003 21:16:27 +0200

What is the SQL query generated?

Your configuration does not match the DTD. Which is

Is it deployed w/o errors?

[EMAIL PROTECTED] wrote:

Dear sir

I am using jboss-3.2.2RC1_tomcat-4.1.24 backed by MySql.

I have an EJB 2.0 Entity bean in which I defined One-to-One relationship
Between Manufacturer and Contact. In the Manufacturer table I keep the
foreign key of the Contact and here I have a CMR field called contact
that is mapped to the CONTACT_ID database field in the MANUFACTURER
database table
In the Contact Bean there is no CMR field referring to the Manufacturer
(neither is A database field in the CONTACT database table referring to
the MANUFACTURER table) Now I see that in my insert SQL statement for the 
Contact Bean there is
an extra field generated (which of course is not there in the DB table)
for that Manufacturer.
I added the XML elements of the relationship.
How must I correctly write these in order not to have the extra fields
in the insert clause? Or must I always have keys in both parts of the
relation (left and right) although I read in the JBossCMP doc that this
was not necessary.
Many grateful thanks for any suggestion.

Here is the XML entry from the ejb-jar XML file
===

manufacturer-contact

manufacturer
 ManufacturerRelationshipRole
One

manufacturer
Manufacturer


contact
contact



contact
 ContactRelationshipRole
One

contact
Contact



And this is the the entry from the jbosscmp-jdbc.xml file
=

manufacturer-contact


 ManufacturerRelationshipRole
Manufacturer


 ContactRelationshipRole


contactId
CONTACT_ID


 java:/ContactInformationManagementDataSource
mySQL
false
false
true
true





---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://l