RE: [JBoss-user] questions on starting multiple jboss3.0 instances
Title: questions on starting multiple jboss3.0 instances run.bat -c myserver -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Sheng ZouSent: Wednesday, June 12, 2002 2:43 PMTo: '[EMAIL PROTECTED]'Subject: [JBoss-user] questions on starting multiple jboss3.0 instances Hi all, I am trying to start multiple jboss3.0 instances, and I made copies of jboss-3.0.0/server/default to jboss-3.0.0/server/myserver. Then I run the new instance as jboss-3.0.0/bin/run.bat myserver, however, I got this message at the beginning: run.bat: unused non-option argument: myserver And it doesn't seem to run "myserver" instance. Help pls! thanks, sheng
RE: [JBoss-user] Higher Level Docs?
Eric, Have you seen the quick start guide for 3.0? It's on the SF DL page @ http://prdownloads.sourceforge.net/jboss/JBoss.3.0QuickStart.pdf?download Some of this stuff is there. There is also some (though some "low level") at the volunteer HTML docs, which may be what you are taling about. OW, go ahead and post questions here. This kind of stuff gets answered pretty quick from what I have seen/experienced. HTH #mike > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 04, 2002 3:23 PM > To: Jboss-User > Subject: [JBoss-user] Higher Level Docs? > > All of the documentation regarding 3.0 configuration files is fairly low > level. Is there a higher-level overview with answers to frequently asked > questions? > > how do i set up an oracle datasource > how can i manage the classpath used by the class-loader from within my > beans > how do i set up jms queues and topics > > I ask because I see a lot of related mail on this subject going back and > forth, and I have similar questions the lack of answers to is preventing > me from going to 3.0. > > Regards > > Eric Kaplan > Armanta, Inc. > 55 Madison Ave. > Morristown, NJ 07960 > Phone: (973) 326-9600 > winmail.dat Description: application/ms-tnef
RE: [JBoss-user] Naming Service Error (Could not start on port 1099 - Adress in use).
They're not Windows services, but I think rmiregistry and cloudscape both default to 1099... HTH #mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Martín Cabrera Sent: Friday, May 24, 2002 10:09 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Naming Service Error (Could not start on port 1099 - Adress in use). Hi; I'm running jboss on Windows 2000 Server and when I try to start jboss I get the following exception. [NamingService] Starting jnp server [NamingService] Could not start on port 1099 java.net.BindException: Address in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:405) at java.net.ServerSocket.(ServerSocket.java:170) at org.jnp.server.Main.start(Main.java:200) at org.jboss.naming.NamingService.startService(NamingService.java:149) Anybody knows which w2k service is listening in this port? Thanks in advance. Martín Cabrera IT Manager Proyecto Abitab OnLine Abitab S.A. Montevideo - Uruguay [EMAIL PROTECTED] ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] RE: [JBoss-dev] Open-Source Fight Flares At Pentagon
They are so cute when they try to convince the world their platforms are more secure I thought I'd share my favorites: "I've never seen a systematic study that showed open source to be more secure," said Dorothy Denning, a professor of computer science at Georgetown University who specializes in information warfare. --- Is there a systematic study that says they were less secure??? What a bozo statement. "Microsoft's push is a new front in a long-running company assault on the open-source movement, which company officials have called "a cancer" and un-American." un-American? In the sense that "American" means anything MS profits from, I guess. a Cancer? No wonder I feel dirty. I liken those f&%^#ing macro viruses more to a cancer than anything else. "Microsoft also said open-source software is inherently less secure because the code is available for the world to examine for flaws, making it possible for hackers or criminals to exploit them. Proprietary software, the company argued, is more secure because of its closed nature." Hmm. If they say it, it must be true. Just more FUD-rhetoric. Nevermind that there are (I would argue) FAR more well-meaning folks testing OSS software than ill-meaning ones. #mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Scott M Stark Sent: Thursday, May 23, 2002 1:45 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: [JBoss-dev] Open-Source Fight Flares At Pentagon Microsoft tries to squelch Open Source at the pentagon, but apparently many at the pentagon are seeing the light. http://www.washingtonpost.com/wp-dyn/articles/A60050-2002May22.html ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development ___ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JBoss in a multi developers environment
Emerson, There is no simple way to do such a setup. You'll have to go in and mod the various files for the port changes. To help keep track of ports, we add some increment of 100 to the default port numbers for each developer (8080 > 8180, 8082 > 8182, etc). Kinda lame, but it works Anyone out there tried setting up virtual network interfaces (/dev/hme0:1, etc) to get around the port conflict problem? Seems like it should work, provided you can set the 'listen' address on all the services (which still means mucking with all the config files, huh). Lastly, FYI, there was a thread on jboss-dev a few weeks back regarding this and how to make it less painful (server automatically finds open ports). I have been working on a solution (based on 3.0), but am working through some issues with it (not the least of which is time :-) ). FWIW, the thread: http://main.jboss.org/forums/thread.jsp?forum=66&thread=13058&message=3708550&q=multiple+instance#3708550 #mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Cargnin - MSA Sent: Monday, May 20, 2002 10:44 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] JBoss in a multi developers environment Has someone used Jboss for development in a centralizazed way? I mean, jboss (along with developer IDE, Eclipse) being used in a huge machine, one instance per developer. I think the problem should be in the ports used by jboss, what woul'd conflict with others developers instances. Is there any automatic way to configure an enviroment like that??? - Original Message - From: "Emerson Cargnin - MSA" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, May 20, 2002 10:31 AM Subject: Re: [JBoss-user] jboss 3.0.0 db configure > put the following in standardjbosscmp.xml file. > > > java:/OracleDS > Oracle8 > > > and here goes my working oracle-services.xml : > > > > > > > > > > > > > > name="jboss.jca:service=LocalTxCM,name=OracleDS"> > > > > > > name="jboss.jca:service=LocalTxDS,name=OracleDS"> > OracleDS > > > type="java.lang.String">jdbc:oracle:thin:@10.1.0.26:1521:oradev erty> > type="java.lang.String">oracle.jdbc.driver.OracleDriver > > type="java.lang.String">aluno1 > type="java.lang.String">aluno1 > > > > > optional-attribute-name="OldRarDeployment">jboss.jca:service=RARDeployment,n > ame=JBoss LocalTransaction JDBC Wrapper > > > > > code="org.jboss.resource.connectionmanager.JBossManagedConnectionPool" > name="jboss.jca:service=LocalTxPool,name=OracleDS"> > 0 > 50 > 5000 > 15 > > ByNothing > > > optional-attribute-name="CachedConnectionManager">jboss.jca:service=CachedCo > nnectionManager > optional-attribute-name="JaasSecurityManagerService">jboss.security:name=Jaa > sSecurityManager > java:/TransactionManager > > jboss.jca:service=RARDeployer > > > > > - Original Message - > From: "Cloudor Pu" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, May 20, 2002 5:47 PM > Subject: RE: [JBoss-user] jboss 3.0.0 db configure > > > hello, > > I am setting a mysql connection to Jboss3.0.0rc2 and have > followed the steps posted at > http://jboss.org/forums/thread.jsp?forum=67&thread=13366 . > I modifed "standardjaws.xml" and "standardjbosscmp.xml" to > make "java:/MySqlDS" as the default datasource. When i start > jboss, there is no error reported. But when i copy the online > docs example "cd.jar" to jboss/server/default/deploy/ , i got > an exception as follows : > > 20:33:25,559 INFO [MainDeployer] Starting deployment of package: > file:/var/jboss/server/default/deploy/cd.jar > 20:33:26,883 INFO [EjbModule] Creating > 20:33:27,046 INFO [EjbModule] Deploying CDBean > 20:33:29,858 INFO [EjbModule] Deploying CDCollectionBean > 20:33:34,529 ERROR [EntityContainer] Exception in service lifecyle > operation: create > java.sql.SQLException: ResourceException > javax.resource.ResourceException: Could not create connection > at > org.jboss.resource.adapter.jdbc.local.LocalDataSource.getConnection(LocalDat > aSource.java:105) > at > org.jboss.ejb.plugins.jaws.jdbc.JDBCCommand.getConnection(JDBCCommand.java:6 > 94) > at > org.jboss.ejb.plugins.jaws.jdbc.JDBCInitCommand.execute(JDBCInitCommand.java > :120) > at > org.jboss.ejb.plugins.jaws.JAWSPersistenceManager.create(JAWSPersistenceMana > ger.java:130) > at > org.jboss.ejb.plugins.CMPPersistenceManager.create(CMPPersistenceManager.jav > a:155) > at org.jboss.ejb.EntityContainer.create(EntityContainer.java:337) > at org.jboss.ejb.Container.invoke(Container.java:790) > - > I would like to know what mis-configurations could cause > this kind of errors? wrong userName,password,url,and any more? > > > 在 2002-05-20 一 的 09:24, Sacha Labourey 写道: > > Hello, > > > > In order to help you with your connection, please provide us with the > > Exception trace you see. > > > > Then, for your second point (CMP), take a look at the
RE: [JBoss-user] oracle configuration
Emerson, It's not clear from the forum thread - have you now based your DS service file on the sample in *RC2*, as David suggested? If you have done that, could you please restate your problem here? Also, have you config'd login-config.xml with a security realm linked to your DS? #mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emerson Cargnin - MSA Sent: Tuesday, May 07, 2002 12:17 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] oracle configuration I have been studying oracle configuration in RC2 ver., but the docs could have a sucint tutorial about how to configure a oracle datasource, what's files are needed to be changed, how the XA conf is done. The sample conf. of oracle is still too blured. I've already posted on the online forum (http://jboss.org/forums/thread.jsp?forum=61&thread=6092&start=0&msRange=50) , but it's still not answered. Thanks in advance Emerson Cargnin - MSA Ramal 861 - Original Message - From: "Dennis Muhlestein" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, May 07, 2002 11:46 AM Subject: Re: Re[2]: [JBoss-user] one to one/none relationship > Thanks for the reply Alex, > > That's what I thought. I found a bug on sourceforge where someone else > reported this behaviour but under the comments it said it had been > fixed. > > When I call MyObject.getItem(..) I don't get null back, I get an object > and then the NoSuchEntityException is thrown. > > Has anyone experienced this same thing? Is there a fix/patch for it? > > -Dennis > > > On Tue, 2002-05-07 at 00:28, Alex Loubyansky wrote: > > Hello Dennis, > > > > Monday, May 06, 2002, 11:34:07 PM, you wrote: > > > > If the cmr field isn't set, you should get null as a result of get > > method invocation. > > > > DM> This is concerning JBoss-3.0 on Branch_3_0 latest CVS > > DM> linux/jdk1.3.1 > > > > DM> On Mon, 2002-05-06 at 14:10, Dennis Muhlestein wrote: > > >> I have a situation where an account can have one or none of an > another > > >> entity bean in a relationship. > > >> > > >> I've defined it below as a one-one relationship. This works fine > if the > > >> billingInfo exists, but if it doesn't and I call getBillingInfo > from the > > >> account, I still get an EntityBean Interface back. (No Exception > > >> occurs) Then, when I try to access or set something on the > billingInfo > > >> interface, I get NoSuchEntityException from jboss. > > >> > > >> Should I use one-many instead?? Shouldn't I get null back or > something > > >> instead of an interface to the ejb when the billingInfo doesn't yet > > >> exists? If this is the correct functionality, then how to I know > if a > > >> billing info record exists or not yet? Is it possible to remove > the > > >> billingInfo record in this case or is that against the law in a > one-one > > >> relationship? > > >> > > >> Thanks for any comments. > > >> Dennis > > >> > > >> > > >> One Account has One/None > > >> BillingInfo > > >> > Account-BillingInfo > > >> > > >> > > >> > AccountToBillingRole name> > > >> One > > >> > > >> > AccountEJB role-source> > > >> > > >> billingInfo > > >> > > >> > > >> > > >> > > >> > BillingToAccountRole name> > > >> One > > >> > > >> BillingInfoEJB > > >> > > >> > > >> > > > > -- > > Best regards, > > Alexmailto:[EMAIL PROTECTED] > > > > > > > > ___ > > > > Have big pipes? SourceForge.net is looking for download mirrors. We > supply > > the hardware. You get the recognition. Email Us: > [EMAIL PROTECTED] > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] RE: jdbc block size in jboss
Eric, I didn't think JDBC spec'd a block size/fetch size property (don't recall it being in the spec). If memory serves, DB2 has such a beast, but I was never able to find anything in the Oracle or Sybase JDBC docs about it. That said, in JDBC 2 (maybe 2.1?), there is a setFetchSize() on the statement interface, but I believe vendors can ignore it. Maybe one of the JBoss CMP guys out there can confirm? Maybe it's known as something besides block size? Typically, in Oracle, block size has a whole different meaning. Mike > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 07, 2002 9:10 AM > To: Jboss-User > Subject: [JBoss-user] RE: jdbc block size in jboss > > 3rd time's a charm. any advice here? > >-Original Message- > From: Eric Kaplan [mailto:[EMAIL PROTECTED]] > Sent: Monday, May 06, 2002 7:57 AM > To: Jboss-User > Subject: jdbc block size in jboss > > > How can I set the jdbc block size used for retrieving rows > from the database? I thought I would be able to just modify the url for > the db connection as follows: > > jboss2.4.1 > >name="URL">jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(HOST=localhost)(PROTOC > OL=tcp)(PORT=1521))(CONNECT_DATA=(SID=dev)));block size=512 > > We have some queries that return a large number of rows and > don't want to use the jdbc default block size of 32. > > Thanks > > Eric > winmail.dat Description: application/ms-tnef
RE: [JBoss-user] RC2 deploy probs
OK - makes perfect sense. I was thinking in the old db-connection-loginId-shared-by-everyone model. BTW - I just noticed (by accident) that if in login-config.xml realm, you point at an MCF name that does not exist, JBoss goes CPU bound and consumes memory like a wild man (up to 400-500 MB RAM). FWIW. Thanks Again, #mike -Original Message- From: David Jencks [mailto:[EMAIL PROTECTED]] Sent: Thursday, May 02, 2002 2:55 PM To: Mike Finn Cc: Jboss-User E-mail Subject: Re: [JBoss-user] RC2 deploy probs On 2002.05.02 14:28:06 -0400 Mike Finn wrote: > David, > Yep - that did it. That one slipped by me. > > One more quick question - when I set a minSize > 0, shouldn't the pool > allocate live connections on startup? I am not seeing that happen. When the pool starts it doesn't know who is logging in. When it gets a Subject from the first request, it makes the rest of the connections up to minSize using that Subject in a separate thread. (Actually using Subject and ConnectionRequestInfo). If you are using something like CallerIdentityLoginModule, so you are getting connections for many different subjects, note that (depending on the Criteria property of the pool) you will get many separate pools, one for each Subject. Each one gets the minSize and maxSize you set. So far I haven't tried to implement a global maxsize with borrowing from one sub-pool to another. David Jencks > > Thanks Much, > Mike > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of David Jencks > Sent: Thursday, May 02, 2002 12:08 PM > To: Mike Finn > Cc: Jboss-User E-mail > Subject: Re: [JBoss-user] RC2 deploy probs > > > OK, you are using the no-longer-included old local wrapper, so since it > isn't getting deployed (it ain't there) the dependencies (your OracleDS) > is > waiting a really long time... > > Could you maybe start over with the example file in rc2? It should be in > the zip in docs/examples/jca. (I'm trying to download the zip right now > to > check it got in;-) > > From cvs, look in connector/src/etc/example-conf. > > Thanks > david jencks > > > On 2002.05.02 11:23:07 -0400 Mike Finn wrote: > > *3.0* RC2, that is. > > I have a datasource (Oracle) service file and related security realm > > that > > deploy fine in RC1. In RC2 neither appears to be bound to JNDI. I > fixed > > the > > JNDI security realm ref in the DS service file to be RC2 compliant > > (java:/jaas/datasourcename > datasourcename). In the server log, In RC1 > I > > see the: > > "Binding object 'org.jboss.resource.adapter.jdbc.JDBCDataSource@16b5c2' > > into JNDI at 'java:/OracleDS_LSR'" > > message, and it in fact is bound in JNDI, along with the correct > > Security > > Realm. > > > > In RC2, no such message appears in the log (no apparent errors > either). > > The JCA services ARE there (JMX-HTML), but not bound in JNDI. > > > > I have not yet deployed anything EAR/JAR/WAR-wise to the RC2 instance > - > > just the orads-service.xml for my datasource. > > > > Any ideas? > > > > I verified this on: > > Sun JDK 1.3.01 on NT4 (both cmd.exe and cygwin) > > Sun JDK 1.3.02 on Solaris 2.8 > > > > TIA, > > Mike > > > > > > > > > > > > > > > > > > > color=#ff > > size=2>*3.0* RC2, that is. > > > >> class=608144913-02052002>I have a > > datasource (Oracle) service file and related security realm that > deploy > > fine > > in RC1. In RC2 neither appears to be bound to JNDI. I fixed the > > JNDI > > security realm ref in the DS service file to be RC2 compliant > > (java:/jaas/datasourcename > datasourcename). In the server log, > In > > RC1 I > > see the: > >> size=2>"Binding object > > href="mailto:'org.jboss.resource.adapter.jdbc.JDBCDataSource@16b5c2'">'org.j > boss.resource.adapter.jdbc.JDBCDataSource@16b5c2' > > > > into JNDI at 'java:/OracleDS_LSR'" > >> size=2>message, and it in fact is bound in JNDI, along with the > correct > > > > Security Realm. > >> size=2> > >> size=2>In RC2, > > no such message appears in the log (no apparent errors either). The > JCA > > > > services ARE there (JMX-HTML), but not bound in > > JNDI. > >> size=2> > face="Century Gothic" size=2> > >>
RE: [JBoss-user] RC2 deploy probs
David, Yep - that did it. That one slipped by me. One more quick question - when I set a minSize > 0, shouldn't the pool allocate live connections on startup? I am not seeing that happen. Thanks Much, Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Jencks Sent: Thursday, May 02, 2002 12:08 PM To: Mike Finn Cc: Jboss-User E-mail Subject: Re: [JBoss-user] RC2 deploy probs OK, you are using the no-longer-included old local wrapper, so since it isn't getting deployed (it ain't there) the dependencies (your OracleDS) is waiting a really long time... Could you maybe start over with the example file in rc2? It should be in the zip in docs/examples/jca. (I'm trying to download the zip right now to check it got in;-) >From cvs, look in connector/src/etc/example-conf. Thanks david jencks On 2002.05.02 11:23:07 -0400 Mike Finn wrote: > *3.0* RC2, that is. > I have a datasource (Oracle) service file and related security realm > that > deploy fine in RC1. In RC2 neither appears to be bound to JNDI. I fixed > the > JNDI security realm ref in the DS service file to be RC2 compliant > (java:/jaas/datasourcename > datasourcename). In the server log, In RC1 I > see the: > "Binding object 'org.jboss.resource.adapter.jdbc.JDBCDataSource@16b5c2' > into JNDI at 'java:/OracleDS_LSR'" > message, and it in fact is bound in JNDI, along with the correct > Security > Realm. > > In RC2, no such message appears in the log (no apparent errors either). > The JCA services ARE there (JMX-HTML), but not bound in JNDI. > > I have not yet deployed anything EAR/JAR/WAR-wise to the RC2 instance - > just the orads-service.xml for my datasource. > > Any ideas? > > I verified this on: > Sun JDK 1.3.01 on NT4 (both cmd.exe and cygwin) > Sun JDK 1.3.02 on Solaris 2.8 > > TIA, > Mike > > > > > > > > > color=#ff > size=2>*3.0* RC2, that is. > > class=608144913-02052002>I have a > datasource (Oracle) service file and related security realm that deploy > fine > in RC1. In RC2 neither appears to be bound to JNDI. I fixed the > JNDI > security realm ref in the DS service file to be RC2 compliant > (java:/jaas/datasourcename > datasourcename). In the server log, In > RC1 I > see the: > size=2>"Binding object href="mailto:'org.jboss.resource.adapter.jdbc.JDBCDataSource@16b5c2'">'org.j boss.resource.adapter.jdbc.JDBCDataSource@16b5c2' > > into JNDI at 'java:/OracleDS_LSR'" > size=2>message, and it in fact is bound in JNDI, along with the correct > > Security Realm. > size=2> >size=2>In RC2, > no such message appears in the log (no apparent errors either). The JCA > > services ARE there (JMX-HTML), but not bound in > JNDI. > size=2> face="Century Gothic" size=2> >size=2>I have > not yet deployed anything EAR/JAR/WAR-wise to the RC2 instance - > just the > orads-service.xml for my datasource. > size=2> >size=2>Any > ideas? > size=2> >size=2>I > verified this on: >size=2>Sun JDK > 1.3.01 on NT4 (both cmd.exe and cygwin) >size=2>Sun JDK > 1.3.02 on Solaris 2.8 > size=2> > size=2>TIA, > size=2>Mike > >size=2> > ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ Have big pipes? SourceForge.net is looking for download mirrors. We supply the hardware. You get the recognition. Email Us: [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] RC2 deploy probs
*3.0* RC2, that is. I have a datasource (Oracle) service file and related security realm that deploy fine in RC1. In RC2 neither appears to be bound to JNDI. I fixed the JNDI security realm ref in the DS service file to be RC2 compliant (java:/jaas/datasourcename > datasourcename). In the server log, In RC1 I see the: "Binding object 'org.jboss.resource.adapter.jdbc.JDBCDataSource@16b5c2' into JNDI at 'java:/OracleDS_LSR'" message, and it in fact is bound in JNDI, along with the correct Security Realm. In RC2, no such message appears in the log (no apparent errors either). The JCA services ARE there (JMX-HTML), but not bound in JNDI. I have not yet deployed anything EAR/JAR/WAR-wise to the RC2 instance - just the orads-service.xml for my datasource. Any ideas? I verified this on: Sun JDK 1.3.01 on NT4 (both cmd.exe and cygwin) Sun JDK 1.3.02 on Solaris 2.8 TIA, Mike
[JBoss-user] RC2 deploy probs
I have a datasource (Oracle) service file and related security realm that deploy fine in RC1. In RC2 neither appears to be bound to JNDI. I fixed the JNDI security realm ref in the DS service file to be RC2 compliant (java:/jaas/datasourcename > datasourcename). In the server log, In RC1 I see the: "Binding object 'org.jboss.resource.adapter.jdbc.JDBCDataSource@16b5c2' into JNDI at 'java:/OracleDS_LSR'" message, and it in fact is bound in JNDI, along with the correct Security Realm. In RC2, no such message appears in the log (no apparent errors either). The JCA services ARE there (JMX-HTML), but not bound in JNDI. I have not yet deployed anything EAR/JAR/WAR-wise to the RC2 instance - just the orads-service.xml for my datasource. Any ideas? I verified this on: Sun JDK 1.3.01 on NT4 (both cmd.exe and cygwin) Sun JDK 1.3.02 on Solaris 2.8 TIA, Mike BEGIN:VCARD VERSION:2.1 N:Finn;Mike FN:Mike Finn ORG:Frontier Communications;Global Information Systems TITLE:Principal Software Engineer TEL;WORK;VOICE:(585) 777-8202 TEL;VOICE:IM: micktoolz TEL;PAGER;VOICE:716-521-9822 TEL;WORK;FAX:(585) 454-6726 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;Enterprise Integration;180 S. Clinton Ave=0D=0AFC 3;Rochester;NY;14646;Unit= ed States of America LABEL;WORK;ENCODING=QUOTED-PRINTABLE:Enterprise Integration=0D=0A180 S. Clinton Ave=0D=0AFC 3=0D=0ARochester, NY = 14646=0D=0AUnited States of America URL;HOME:http://www.globalcrossing.com URL;WORK:http://www.citizenscommunications.com EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020107T134207Z END:VCARD
RE: [JBoss-user] Differences between 2.x and 3.x?
Title: RE: [JBoss-user] Differences between 2.x and 3.x? Ignore last. JBoss OpenTool (from Protegra) does appear to keep jboss.xml and jbosscmp-jdbc.xml in synch. My bad. #mike -Original Message-From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]Sent: Thursday, April 18, 2002 5:24 PMTo: Mike Finn; JD Brennan; [EMAIL PROTECTED]Subject: Re: [JBoss-user] Differences between 2.x and 3.x? Granted JBuilder has come a long way, and yes provides a lot of functionality. Does it keep jboss.xml and jbosscmp-jdbc.xml/jaws.xml in sync? cheers dim - Original Message - From: Mike Finn To: JD Brennan ; [EMAIL PROTECTED] Sent: Thursday, April 18, 2002 11:01 PM Subject: RE: [JBoss-user] Differences between 2.x and 3.x? With JB6EE you can add/remove bean methods at will (to the implementation class source) and *JBuilder* keeps interfaces, etc in synch for you. Rename the method, add parms, etc, and the changes are reflected as well. It also gives you a property editor for beans (like for whether to generate local and/or remote interfaces) and methods. Halfway decent Entity bean generator too. The Open Tool is not necessary for any of this functionality. #mike -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of JD BrennanSent: Wednesday, April 17, 2002 6:28 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] Differences between 2.x and 3.x? I believe JBuilder will make it easy to create a bean in one place, but when you want to add a new method to it, you have to modify all the files. XDoclet allows you to create and modify your bean in one place - very cool! JD -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 3:03 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [JBoss-user] Differences between 2.x and 3.x? > > Also - have a look at XDoclet (http://sf.net/projects/xdoclet) as a useful > > development tool that has strong support for JBoss. > > Thanks. I will be using JBuilder 6 with the JBoss open tool so I think I > might have that side of things covered. just FYI, XDoclet is a tool that plugs into ant, and saves you time generating, and keeping uptodate, your remote/home interfaces and deployment descriptors etc. There's no reason you couldn't use it with JBuilder. cheers dimm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] questions of jboss start and jboss library
Bruce, It would help to know what OS, JVM, and JBoss version are you using (re: problem #1). There should only be one process for JBoss (aside from the run shell) - I suppose except Linux, where threads show as processes, if memory serves correctly. Also, how are you shutting down the server? shutdown.sh? ctrl-c? Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bruce Ling Sent: Thursday, April 18, 2002 9:08 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] questions of jboss start and jboss library Importance: High two questions: 1. I noticed that if I restarted the jboss several time, I cannot get it started properly any more. It complains that a lot of the ports are occupied. The current way I solve the problem is that I go hunting all the java process and kill them. Then it is fine. Is there any smarter way than this? This is very annoying. It seems that kill the jboss doesnot bring down all the services 2. I have some javabeans which are shared used by all the session beans and entity beans. Currently I jar them and put them in the lib/ext. But this brings the problem of the deploying as if I make any changes in the javabean I need to bring down the jboss server and restart. This is very annoying as it is not hot deploy anymore. I know if I jar everything together and put it in deploy, then it works but the problem is that I don't want to jar everytime javabeans into all the session and entity bean. Also this creates java code management problem as it may cause classpath conflicts. Tx for the advice in advance. Bruce ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] 3RC1 Requires users.properties File?
David, Yeah - I see that now. Sorry for causing confusion -was stuck in Beta2 thinking. So it looks like the authentication for a datasource connection (against the DB) is now done through a JAAS realm as opposed to through the MCF properties in the JDBC RA (if that's where it was..)? Is/was there another thread discussing this that I can look at? #mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of David Jencks Sent: Thursday, April 18, 2002 2:07 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] 3RC1 Requires users.properties File? When you get messages about the UserRolesLoginModule when you are trying to make a db connection in rc1, that means you haven't set up the security domain corresponding to your db config. DON'T try to set up the UserRolesLoginModule to solve this, it won't supply the info needed to make the db connection. Follow the instructions now in all the sample files in connector/src/etc/example-config. Anyone have an idea on how to make a more useful error message occur? Thanks david jencks On 2002.04.18 13:08:34 -0400 Mike Finn wrote: > Does this ear file use JAAS? I wouldn't think you would see this unless > the > container was loading JAAS to satisfy some security constraint. Mine > doesn't. > > Looks like auth.conf stuff is now in login-config.xml (as of RC1?). And, > in > login-config.xml, the 'other' (ie the default) security domain is set up > to > use UsersRolesLoginModule, which reads users.properties and > roles.properties. BUT, there appears to be no such *.properties files in > RC1 > (or in HEAD). If the default behavior is going to be UsersRoles, then > there > probably should be a user and roles.properties file there - at least with > a > doc header. But then, I am pretty sure it's been this way all along (at > least since 2.4). > > Read the header comments in the source to see how this module works. It's > pretty simple: > http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosssx/src/main/org/jb > oss/security/auth/spi/UsernamePasswordLoginModule.java > Put the files in conf/default (or whatever). > > Mike > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Hunter > Hillegas > Sent: Thursday, April 18, 2002 12:25 AM > To: JBoss User > Subject: [JBoss-user] 3RC1 Requires users.properties File? > > > Just checked out a fresh copy of the 3.0RC branch and compiled. > > When deploying an EAR, I see this: > > 21:20:20,036 ERROR [UsersRolesLoginModule] Failed to load > users/passwords/role files > java.io.IOException: Properties file users.properties not found > > Is this file required? I've never used/seemed-to-need it before... What > should it contain? > > This sets off a long chain of exceptions that all imply that required > security is not present. > > Thanks, > Hunter > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] 3RC1 Requires users.properties File?
Does this ear file use JAAS? I wouldn't think you would see this unless the container was loading JAAS to satisfy some security constraint. Mine doesn't. Looks like auth.conf stuff is now in login-config.xml (as of RC1?). And, in login-config.xml, the 'other' (ie the default) security domain is set up to use UsersRolesLoginModule, which reads users.properties and roles.properties. BUT, there appears to be no such *.properties files in RC1 (or in HEAD). If the default behavior is going to be UsersRoles, then there probably should be a user and roles.properties file there - at least with a doc header. But then, I am pretty sure it's been this way all along (at least since 2.4). Read the header comments in the source to see how this module works. It's pretty simple: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/jbosssx/src/main/org/jb oss/security/auth/spi/UsernamePasswordLoginModule.java Put the files in conf/default (or whatever). Mike -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Hunter Hillegas Sent: Thursday, April 18, 2002 12:25 AM To: JBoss User Subject: [JBoss-user] 3RC1 Requires users.properties File? Just checked out a fresh copy of the 3.0RC branch and compiled. When deploying an EAR, I see this: 21:20:20,036 ERROR [UsersRolesLoginModule] Failed to load users/passwords/role files java.io.IOException: Properties file users.properties not found Is this file required? I've never used/seemed-to-need it before... What should it contain? This sets off a long chain of exceptions that all imply that required security is not present. Thanks, Hunter ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Differences between 2.x and 3.x?
Title: RE: [JBoss-user] Differences between 2.x and 3.x? With JB6EE you can add/remove bean methods at will (to the implementation class source) and *JBuilder* keeps interfaces, etc in synch for you. Rename the method, add parms, etc, and the changes are reflected as well. It also gives you a property editor for beans (like for whether to generate local and/or remote interfaces) and methods. Halfway decent Entity bean generator too. The Open Tool is not necessary for any of this functionality. #mike -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of JD BrennanSent: Wednesday, April 17, 2002 6:28 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] Differences between 2.x and 3.x? I believe JBuilder will make it easy to create a bean in one place, but when you want to add a new method to it, you have to modify all the files. XDoclet allows you to create and modify your bean in one place - very cool! JD -Original Message- From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]] Sent: Wednesday, April 17, 2002 3:03 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [JBoss-user] Differences between 2.x and 3.x? > > Also - have a look at XDoclet (http://sf.net/projects/xdoclet) as a useful > > development tool that has strong support for JBoss. > > Thanks. I will be using JBuilder 6 with the JBoss open tool so I think I > might have that side of things covered. just FYI, XDoclet is a tool that plugs into ant, and saves you time generating, and keeping uptodate, your remote/home interfaces and deployment descriptors etc. There's no reason you couldn't use it with JBuilder. cheers dimm ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SB timeout -> passivation -> activation failure
> Hmm, that does seem strange that you can serialize the home & pk, but not > the handle. Yes, it does seem strange which is why I am assuming there is something more fundamental that I just don't yet get. > I'm afraid I have never used EJB handles, so I won't be much > help there. Every time I have though that I should use a handle, it has > turned out that an EJB reference (a javax.ejb.EJBObject, actually) would > work just as well. An EJBObject should be valid across bean passivations, > but I don't know if it's guaranteed valid across server restarts. I don't know about server restarts either. As an experiment I let my session bean be passivated with a reference to an EB, and it did activate properly. However, this is not what we are supposed to do if we need to pass a reference out to a remote (beyond of app server) client. That is why I was using handles. My thinking is that the wrapper class (which holds the EB reference) shouldn't have to care if it was being used by another EJB in the same app server or being sent far, far, away. It should do the same thing no matter what. (I hope I can figure out how to achieve this in practice). > I still don't quite understand where readObject() and writeObject() are > being used. Did you implement these methods in your session bean, to > manually serialize your utility class? Or did you implement them in your > utility class, to manually serialize the handles? I guess I'm not quite > sure what the manual serialization is for. I implemented it in the wrapper classes for the EBs. I understood (and still believe) that I should pass EB handles to remote clients, and not the reference to EJBObject. Passing the remote interface is useless because it does not identify a specific EB ie. one associated with its primary key. My client via its SFSB asks for acess to an EB, but it is the SFSB that figures out which EB the client should access based on its state. So the SFSB must pass back a specific reference, not just an interface. Its the wrapper around this EB reference that uses readObject() and writeObject(). The wrapper instance holds a reference to a specific EB but can't let itself be serialized with this reference - because it does not know where it will be deserialized it must swap the reference to the EB with its handle and let the handle be serialized instead - ala writeObject(). Upon deserialization it uses readObject to get the handle and then convert it back to a proper EB reference wake-up. Here an example from one of my wrappers (about 12 lines): private transient CachedRecordSet crs; -- other non transient fields omitted -- -- business logic omitted -- private void writeObject(java.io.ObjectOutputStream out) throws IOException { out.defaultWriteObject(); Handle handle = bean.getHandle(); out.writeObject(handle); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); Handle handle = (Handle) in.readObject(); bean = (CachedRecordSet) javax.rmi.PortableRemoteObject.narrow(handle.getEJBObject(), CachedRecordSet.class); } > If your utility object has a reference to entity bean (E), and (E) is > passivated, the utility's next call to (E) will reactivate it. Yes. > If that utility object is a non-transient data member of a session bean > (S), and (S) is passivated, the utility object should be serialized > (assuming it's serailziable.). Yes. > When (S) is reactivated, the utility's reference to (E) should be intact. Yes. But, by testing, only if the utility's reference was serialized NOT using a handle (ie do nothing, or use the home/pk substitution). > If the utility object is passed out to a client (an EJB client or a > servlet,) I think that your only problem could be the client surviving > server restarts... your reference to (E) would go away unless you > kept a handle instead of an EJBObject. Yes. When passing to a remote client I can use handles, but when using it with a local client, as with a SFSB in same application, I seem to have to make sure that if the SFSB gets passivated that it does NOT use handles. So when being serialized it seems that the bean referene needs to know why its being serialized so that it can choose the correct serialized format !! And IMHO that sucks. > I hope that helps Yes. Although I don't think the problem is solved, in the short run I can make it work, and that puts me far ahead of where I was a few days ago. >, but I'm still not quite sure if I'm addressing the right > question You are. > (or if I'm telling you things you already know.) Well, I'm not quite sure what exactly I do know... so no. Th
Re: [JBoss-user] SB timeout -> passivation -> activation failure
> I have never tried serializing an object by explicitly calling readObject() > and writeObject() on a serializable. Does that work? Yes. During serialization these methods will get called to allow a class to control its own serialization process (mostly for transient fields). I am using them when serializable classes (bean or otherwise) have references to beans. These classes hold their bean references in transient fields and during serialization I write out either the handle, or now the home/pk pair. > Is there a reason why you were using the EJB handle? I'm pretty sure it's > no problem just to keep a reference to an entity bean, which will be > serialized by the container when your SSB is passivated. If you needed a > handle (which I beleive is mostely used if you need to store a long-term > reference outside the app server,) this should also be serialized for you > automatically. > Maybe I'm not understanding what you're trying to do? Okay. I use a utility class to wrap all access to entity beans, this is used to localize lookup and exception handling. Any class (bean or otherwise) that wants access to an EB uses its utility class. So my SFSB gets an instance of the utility class and the utility class holds the reference to the EB in a transient variable. As well the SFSB may pass to the remote client a copy of the utility class so that it can directly access some EB services independent of its 'session'. I read somewhere (can't recall just now) that I was to use the handle, so that was what I was doing. But after resolving the passivation/activation yesterday, I have changed all my wrapper classes to use home/pk. I wish I better understood what was happening with these various types of references so I could know precisely which type to use under which circumstances. I am pretty confused. And you have suggested that for in server references (those held directly or indirectly by beans) that I shouln't have to do anything, the server will take care of it --frustrated sigh. And what if the reference was from a servlet/jsp when the web container is running in the save VM. Would it still be taken care of? Would you happen to know a reference/tutorial that distinguishes and contrasts each of the reference types and explains when and how to use them apppropriately? Thanks again Mike. === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SB timeout -> passivation -> activation failure
Thanks, > In JBoss 2.4 and greater there is a tag for this purpose. Excellent, I will upgrade. > So: try to put in a very simple stateful bean and see if everything works > ok. If not then it's a reproducible bug and you can file in a bug in > sourceforge; otherwise try to add complexity to this simple stateful until > is similar to your real stateful and see at which step things go wrong. > > Keep us informed In an earlier post I figured what was wrong and it is not JBoss's fault. Quoting myself "When I checked what was happening during passivation of the SFSB I was using readObject() and writeObject() to serialize the handles of of any referenced entity beans. A handle was obtained from an EB's remote interfaces via EJBObject.getHandle(). The fix was to instead serialize both an EB's home and primary key via EJBObject.getEJBHome() and EJBObject.getPrimaryKey()." Although in that post I also asked why doesn't the handle approach work. Thanks. Mike === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SB timeout -> passivation -> activation failure
> Passivation should definitely not kill a stateful session bean. > (Does JBoss do this?) No. It seems that it was (as you suggested) a problem with serialization of references that my stateful SB was holding (albeit somewhat indiretly) to entity beans. The last comments Burkhard and you made were the missing link that I needed. Thanks to Michael, yourself, and Burkhard for the help. I greatly appreciate it. But, humour me please... two related questions... Q1 When I checked what was happening during passivation of the SFSB I was using readObject() and writeObject() to serialize the handles of of any referenced entity beans. A handle was obtained from an EB's remote interfaces via EJBObject.getHandle(). The fix was to instead serialize both an EB's home and primary key via EJBObject.getEJBHome() and EJBObject.getPrimaryKey(). Why does this work? I thought that we were supposed to use the handle to pass EB references around. What exactly should be saved to properly and portably restore the EB reference? And does it make a difference if the reference is being passed to a real remote client instead of another bean (I would hope not)? Q2 So JBoss is correctly passivating SFSBs once the is reached, and will activate them correctly (if I don't screw it up) when later needed. How then does JBoss know when to finally kill off a bean (eg. where the client has died)? Is there a way to configure this? Thanks again Mike ======= Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SB timeout -> passivation -> activation failure
Okay, maybe I'm being daft - but I just don't get it. from the manual specifies the max age a bean can have before being passivated by the overager ... the specifies the period of the resizer, that is a periodic task that runs ... Purpose of this periodic task is to shrink / enlarge the cache capacity upon 3 other parameters... So after 10 minutes of inactivity (jboss's default of 600 secs) it should be passivated --not destroyed. Shouldn't I be able to continue to use the bean at 12 minutes (upon which the server will de-passify the bean ie. activate it) without the client ever being aware? And if is for passivation where do I specify the ultimate time after which a very old inactive bean (passivated or not) should actually be destroyed (eg. dropped connections)? Currently it seems that the is acting as a destroyer and not a passivator. Is this understanding correct? Thanks for continuing to help. Mike. P.S. As an aside I would have thought that using a min cache size (jboss's defalut is 50) greater than the number of active beans (3 in my development setup) that there would be no passivation at all. As there is still room in the cache why why would jboss push out any bean (except of course those that should be killed -- but they should be killed and not passivated anyways)? On Monday 16 July 2001 10:47, you wrote: > Passivation should definitely not kill a stateful session bean. (Does > JBoss do this? So far, I haven't deployed anything in JBoss that is idle > for that long a period.) However, I wouldn't be surprised if JBoss > periodically aged-out unused stateful session beans. I think that most > good app servers will do this to clean up after clients which have died, or > have not politely disconnected. > > If that's what's happening, the ideal option would be to increase the max > bean age to accomodate your longest expected login period, but leave > passivation as is. If that's not what's happening, then maybe it's a bug? > > Mike === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] SB timeout -> passivation -> activation failure
Thanks Michael & Burkhard > I haven't done much experimenting with performance settings, but you might > be able fix this with some adjustments the container cache policy. See > http://www.jboss.org/documentation/HTML/ch06s08.html, the section on > "Advanced cache configuration". You might try adjusting the > setting. (I assume this can apply to stateful session bean timeouts.)... > Michael This might solve an immediate problem but won't do in the long run see below... > if this id SLSB you have to tweak your container settings, as Mike said, > but with SFSB, you should be able to reactive your session?!? > SL=stateless, SF=statefull, BUT I'm not 100% sure, since I would call this > a design issue having sessions of several hours, there SHOULD be other > ways... Burkhard Maybe a bit more info will help. I am building the server side with EJB's because I very much like the promise of putting business login in a middle tier (in this case an enterprise java app server ie JBoss). Phase one of my project is to build a somewhat traditional client app (Swing in this case) that uses the services of the app server instead of the 2-tier model which invariably would result in some business logic in the client app (yuck - been doing that for far too long). So an office worker using the app needs to authenticate once in the morning and have access all day long... ie. a long stateful session. Passivation is okay (in fact fantastic) but only if (re)activation works. Phase two of the project is to open up access up to business partners and customers via web or tiny-apps. These will also use session beans (hopefully the same one as the former) but will be much shorter lived. So, I am happy to change the bean aging, and even clone the bean so that I can have one that is short-lived and one that is long-lived but the long lived one must be able to be able to survive multiple passivation-activation cyctes until it is cleanly terminated by the client or a suitably long (in the order of hours) timeout occurs. Right now it seems once passivation occurs on the stateful bean the session dissapears into a black hole, and when the server tries to activate it it blows. Surely this is not correct behaviour on part of the server? And this is what I am trying to fix. Sorry for the long winded answer but figured more was better than not enough. Thanks Mike. === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] SB timeout -> passivation -> activation failure
If I let a 'connected' client sit around for more than apporx 20 minutes it blows on its next attempt to use a remote method of the SessionBean (only the one session appears to be blown, since I can start a new client session without restarting the server). What I want is to be able to have the client's session stay alive for a very long time (12-15 hours total) and be able to survive 2-3 hours of inactivity. It seems (from the messages below) that my sessions cannot be restored once passivated. Is this a timeout/activation problem that can be fixed by changing my configuration? Is there any more info I can provide to help diagnose the problem? or more simply Help! How can I fix this? Thanks in advance for any help. Mike Server = JBoss-2.2.1_Tomcat-3.2.1 * Messages that seem relevant which appear in server log *** [Bean Cache] Scheduling for passivation overaged bean gb/Session with id = 995041851805 - Cache size = 2 [Bean Cache] Aging out from cache bean gb/Sessionwith id = 995041851805; cache size = 2 [Container factory] Scheduled passivation of bean gb/Session with id = 995041851805 [Container factory] Passivated bean gb/Session with id = 995041851805 ... (other non-relevant stuff) [gb/Session] TRANSACTION ROLLBACK EXCEPTION:$Proxy6; nested exception is: java.rmi.NoSuchObjectException: $Proxy6 [gb/Session] java.rmi.NoSuchObjectException: $Proxy6 [gb/Session]at org.jboss.ejb.plugins.AbstractInstanceCache.get(AbstractInstanceCache.java:17 3) [gb/Session]at org.jboss.ejb.plugins.StatefulSessionInstanceInterceptor.invoke(StatefulSessi onInstanceInterceptor.java:157) [gb/Session]at org.jboss.ejb.plugins.TxInterceptorCMT.invokeNext(TxInterceptorCMT.java:133) [gb/Session]at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.j ava:263) [gb/Session]at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:99) [gb/Session]at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195) [gb/Session]at org.jboss.ejb.StatefulSessionContainer.invoke(StatefulSessionContainer.java:3 26) [gb/Session]at org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerIn voker.java:392) [gb/Session]at java.lang.reflect.Method.invoke(Native Method) [gb/Session]at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241) [gb/Session]at sun.rmi.transport.Transport$1.run(Transport.java:142) [gb/Session]at java.security.AccessController.doPrivileged(Native Method) [gb/Session]at sun.rmi.transport.Transport.serviceCall(Transport.java:139) [gb/Session] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443) [gb/Session]at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:64 3) [gb/Session]at java.lang.Thread.run(Thread.java:484) === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Portability of bean references between client and server
This is an EJB question (not really JBoss specific)... I have a entity (cmp) bean which is just a simple sequence number generator. Its one fancy feature is that with each request it blocks-off a series of numbers for the client. What I am trying to do is wrap the access to the entity bean in a utility class (SequenceHolder) which simply returns the next sequence number from the block that it got from the entity bean. When it has used up all that were in the block it will request a new block from the entity bean. This should greatly reduce the number of accesses to the entity bean at the cost of some skipped/wasted numbers. In general this is simple enough - but I want the same utility class to be able to be used on the server (as a utility to other EJB's) and on the client. How do I go about setting up the state of SequenceHolder so that a) its access to the entity bean will work from both the server and the client b) it can be created on the server and serialized back to the client? I know this is general EJB stuff, but at my current level it seems quite tricky, and I still have a muddy (at best) understanding of the allowed uses of bean/home/remote references after all the book/docs I've read. Any help, examples, or RTFM's are appreciated! Thanks in advance Mike. === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Transactions - Container Managed
I am having a problem with rolling back a container managed transaction. Here is the scenario... Stateful bean(name = gb/dbSession) calls CMP entity bean (name = gb/sequence). Both are deployed in same jar file with the transaction attribute set to "Required". In order to test transactions I put a ctx.setRollbackOnly() call in the session bean before it returns. I expected that the changed data in the entity bean would be tossed (ie not saved to the datastore) as the whole transaction would be rolled back. But not only was the data committed to the database (postresql if it helps) but a call to ctx.getRollbackOnly() just prior to and just after the ctx.setRollbackOnly() returned true both times. What gives? A further heavy handed approach was to force a runtime exception (a divide by zero which is commented out in the code below) in the session bean and see if that would rollback the transaction... but no success. I don't get it. One possibility was that the org.opentools.minerva.jdbc.xa.wrapper.XADataSourceImpl was not turning off the JDBC autocommit, but a check of the code ruled that out. So I am stumped. Help please. Thanks. --ugly details below -- jboss-tomcat-2.1-beta postgresql 7.0.3 postgresql-jdbc-7.0.3-2mdk.i586.rpm postgresql-server-7.0.3-2mdk.i586.rpm --deployment descriptor bits- gb/dbSession com.globalBotanical.server.DbSessionHome com.globalBotanical.server.DbSession com.globalBotanical.server.DbSessionBean Stateful Bean gb/sequence Entity com.globalBotanical.server.SequenceHome com.globalBotanical.server.Sequence gb/sequence Repository for sequence number generators gb/sequence com.globalBotanical.server.SequenceHome com.globalBotanical.server.Sequence com.globalBotanical.server.SequenceBean com.globalBotanical.server.SequencePK False Container name val gb/dbSession * Required gb/sequence * Required --business method from session bean- public long getNextSequence(String name, long delay) { long next = 0; try { InitialContext jndiContext = new InitialContext(); Object ref = jndiContext.lookup("java:comp/env/gb/sequence"); SequenceHome home = (SequenceHome) PortableRemoteObject.narrow (ref, SequenceHome.class); Sequence seq = home.findByPrimaryKey(new SequencePK(name)); next = seq.getNext(); System.out.println("thinking about returning: " + next); System.out.println(ctx.getRollbackOnly()); ctx.setRollbackOnly(); System.out.println(ctx.getRollbackOnly()); } catch (Exception e) { e.printStackTrace(); } // int y = 0; // int x = 2/y; return next; } --CMP entity bean's only business method public long getNext() { long oldval = val; val = val + 20; return oldval; } Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
Re: [JBoss-user] JNDI Naming for references
Thanks to Vladimir, and Åsmund. I feel a bit daft (>6 hours) since it was just a leading "/" problem in the end "java:/comp/env/..." vs "java:comp/env/...". Just as the manual had said. One more question though... When rereading the chapter (very, very carefully this time) it says that the narrow operation is not required after looking up the home interface when using JBoss. Every book that I have read though says it should be there. Is this a JBoss specific thing? Or all all containers likely to move in this direction? Thanks again. ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JNDI Naming for references
(class: org.jnp.interfaces.NamingContext) [gb/dbSession] | +- testDurableTopic (class: org.jbossmq.SpyTopic) [gb/dbSession] | +- example (class: org.jbossmq.SpyTopic) [gb/dbSession] | +- testTopic (class: org.jbossmq.SpyTopic) [gb/dbSession] | +- metrics (class: org.jbossmq.SpyTopic) [gb/dbSession] | +- bob (class: org.jbossmq.SpyTopic) [gb/dbSession] | +- beancache (class: org.jbossmq.SpyTopic) [gb/dbSession] +- UILQueueConnectionFactory (class: org.jbossmq.SpyQueueConnectionFactory) [gb/dbSession] +- gb (class: org.jnp.interfaces.NamingContext) [gb/dbSession] | +- dbSession (class: $Proxy180) [gb/dbSession] | +- z (class: $Proxy178) [gb/dbSession] | +- sequence (class: $Proxy177) [gb/dbSession] +- QueueConnectionFactory (class: org.jbossmq.SpyQueueConnectionFactory) [gb/dbSession] +- UILTopicConnectionFactory (class: org.jbossmq.SpyTopicConnectionFactory) [gb/dbSession] javax.naming.NameNotFoundException: xxx not bound [gb/dbSession] at org.jnp.server.NamingServer.getBinding(NamingServer.java:474) [gb/dbSession] at org.jnp.server.NamingServer.getBinding(NamingServer.java:482) . . === Mike Finn Tactical Executive Systems [EMAIL PROTECTED] ___ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user