RE: [JBoss-user] CMP - Primary Key Strategies?
I'm trying something different...to try to solve the same problem.and am using Oracle8. I have a trigger on the table set to fire "before INSERT" and set the id to the mySqeunce.nextval. But this doesn't seam to be working. On the entity bean that I get back i call getId and Jboss throws this exception: java.lang.IllegalArgumentException: Attempt to get a lock for a null object. The row however gets inserted properly. Does anyone know why this is the case? > -Original Message- > From: Rod Macpherson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 18, 2003 1:43 PM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] CMP - Primary Key Strategies? > > > Consider a static interface createPrimaryKey() or > createPrimaryKey(String source) where source is a sequence name in the > oracle implementation. Use a pooled connection (needless to say) and > cache, say, a few dozen keys in memory. Alternatively you can > make your > sequence increment by, say, 100 and dish out keys until you > exhaust the > cache then grab another base value: high-low pattern as it is > sometimes > called. This strategy is portable insofar as you can have an > implementation for various RDBMSs but the rest of your code does not > change. The ejbCreate just calls createPrimaryKey and if anything goes > wrong you throw away that key. If you're server bounces you throw away > the cached keys, no biggie. > > > -Original Message- > From: Eric Tim [mailto:[EMAIL PROTECTED] > Sent: Monday, March 17, 2003 9:39 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-user] CMP - Primary Key Strategies? > > > I'm working on a CMP EntityBean with JBoss3 on > Oracle8. > > My primary key must be a unique number. Oracle has a > nice facility for handling sequences, which doesn't > seam possible with this senerio because i'd need to > write some jdbc code in the ejbCreate method to get > the nextval. > > I'm aware that there are several J2EE > patterns/blueprints to solve this...most have > not-so-clean side effects that i'd like to > avoid...such as extra tables..etc. > > Is there anything that i can do with JBoss to solve > this problem in a simple and clean manner? > > Someone told me that there is a cmp engine that i can > buy that plugs into jboss that makes this easy. Does > anyone know what product this is? Does anyone have > experience with it? > > thanks, > -et > > __ > Do you Yahoo!? > Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! > http://platinum.yahoo.com > > > --- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > --- > This SF.net email is sponsored by: Does your code think in ink? > You could win a Tablet PC. Get a free Tablet PC hat just for playing. > What are you waiting for? > http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for? http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Store large pdfs with JBoss
I'm using CMP entity beans. Particularly to achieve database transparency and to avoid writting all of the db access code. Do you know how to do it with CMP? -Original Message- From: David Ward [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 2:58 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Store large pdfs with JBoss I have been able to put CLOBs and BLOBs into Oracle 9i using JBoss 3.0.4, though admittedly after jumping through several hoops. 1) yes, ejb's aren't supposed to do i/o - I do my work delegated from the servlet level. 2) You have to have autocommit off. For some reason autocommit is on by default in JBoss 3 (wasn't in 2.4) from Connections from DataSources. Please someone tell me how to turn this off in a global config somewhere! 3) You have to first insert a row using an empty lob. For example, insert into my_table (key, data) values ('1', empty_blob()) . You could have used empty_clob() if you were using CLOBS instead of BLOBS. 4) You can then update the BLOB, hower you have to re-select *** using select for update ***. If you don't use select for update, ** it won't work **. For example, select data from my_table where key = '1' for update 5) You then can update the BLOB from the ResultSet. Notice I said oracle.sql.BLOB not java.sql.Blob. I had to use an Oracle-specific type here. I couldn't get it to work any other way, and I spent hours (no, setBinaryStream does not work)... For example, BLOB blob = (BLOB)rs.getBlob(1); BufferedOutputStream bos = new BufferedOutputStream( blob.getBinaryOutputStream() ); // write to the output stream // safely close everything up 6) Don't forget to commit the work you did. This will commit the insert and the data your wrote to your BLOB. 7) I set the autocommit on the Connection back to what it was when I first got it from the DataSource, before I close it (the Connection, which returns it to the pool). Again, I'd like to see autocommit off since I wrap everything in a UserTransaction and it should be committed there instead... Hope this will save you some of the painful time I had to go through if you decide to go this route. David -- Luttrell, Peter escribió:: > Has anyone had experience storing large pdfs with jboss, say ~5mbs each? > > I would like to do it with Oracle and BLOBs, but i've read that there's > problems with the drivers and jboss and it doesn't look like it will be > possible. > > Has anyone done with with any other database? > > Does anyone have ideas on how else to store these files, maybe without a > database? I've always thought the filesystem was pretty much off limits > from the appserver. > > thanks. > .peter > > > > > This transmission contains information solely for intended recipient and > may be privileged, confidential and/or otherwise protect from > disclosure. If you are not the intended recipient, please contact the > sender and delete all copies of this transmission. This message and/or > the materials contained herein are not an offer to sell, or a > solicitation of an offer to buy, any securities or other instruments. > The information has been obtained or derived from sources believed by us > to be reliable, but we do not represent that it is accurate or complete. > Any opinions or estimates contained in this information constitute our > judgment as of this date and are subject to change without notice. Any > information you share with us will be used in the operation of our > business, and we do not request and do not want any material, nonpublic > information. Absent an express prior written agreement, we are not > agreeing to treat any information confidentially and will use any and > all information and reserve the right to publish or disclose any > information you share with us. > -- - David Ward [EMAIL PROTECTED] http://www.dotech.com --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or est
RE: [JBoss-user] List of active users logged in thru JAAS
Scott, could you point us at the documentation for this new feature? thanks. .peter -Original Message- From: Scott M Stark [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 5:17 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] List of active users logged in thru JAAS Its been added for 3.0.5 Scott Stark Chief Technology Officer JBoss Group, LLC - Original Message - From: "Meyer-Willner, Bernhard" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, January 09, 2003 9:02 AM Subject: Re: [JBoss-user] List of active users logged in thru JAAS Thanks for your two solutions, you guys. Unfortunately I don't have a web layer, but instead a Swing GUI based app talking directly to the EJB-based business logic via business delegates. So this solution won't work for me like that :( Are there any other ways to get a list of active users from the JAAS LoginContext? Cheers, Bernhard -Ursprüngliche Nachricht- Von: Luttrell, Peter [mailto:[EMAIL PROTECTED]] Gesendet: Donnerstag, 9. Januar 2003 17:45 An: '[EMAIL PROTECTED]' Betreff: RE: [JBoss-user] List of active users logged in thru JAAS I've done a very similar solution. I had problems getting the HttpSessionListener to work so i used the HttpSessionAttributeListener instead. This meant that my solution was Jetty specific but in the end, that was ok. Here's the code, stripped of exception handling and such: public class HttpSessionEventHandler implements HttpSessionAttributeListener { public void attributeAdded( HttpSessionBindingEvent event ) { if ( "org.mortbay.jetty.Auth".equalsIgnoreCase( event.getName() ) ) { String sessionKey = event.getSession().getId(); String applicationKey = event.getSession().getServletContext().getServletContextName(); String userKey = event.getValue().toString(); MonitorService.getMonitorService().registerSession( sessionKey, userKey, applicationKey ); } } public void attributeRemoved( HttpSessionBindingEvent event ) { if ( "org.mortbay.jetty.Auth".equalsIgnoreCase( event.getName() ) ) { MonitorService.getMonitorService().removeSession( event.getSession().getId() ); } } public void attributeReplaced( HttpSessionBindingEvent event ) { } } Filter: public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException { //do this before hand so that the actual page that is displaying the results gets updated, but // it doens't work all the time before because the user might night be authenticated, thus // ignore any such error because it will be done after the request processing as well... HttpServletRequest httpRequest = ( HttpServletRequest ) request; MonitorService.getMonitorService().updateSession( httpRequest.getSession().getId() ); chain.doFilter( request, response ); HttpServletRequest httpRequest = ( HttpServletRequest ) request; MonitorService.getMonitorService().updateSession( httpRequest.getSession().getId() ); } The underlying storage of session tracking info can of course be done many ways, such as a singleton or MBean. Mine has the concept of applications and usernames. I use the session id for the uniquekey identifying the session in the service. enjoy. .peter -Original Message- From: Krishnakumar N [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 9:12 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] List of active users logged in thru JAAS We use a combination of a filter and a HttpSessionListener to achieve something like this (we do not store the list of currently stored users in a db). The filter checks whether the current user is logged in and if yes, adds the user id to a application context hashtable. The same hashtable is used by the same filter to prevent multiple simultaneous logins on the same userid. The timeout, in case of browser crash/hang/close, is handled via Session.setMaxInactiveInterval() along with the sessionDestroyed event handler in the HttpSessionListener . Cheers, Krishna -Original Message- From: Meyer-Willner, Bernhard [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 7:14 PM To: JBoss-User (E-Mail) Subject: [JBoss-user] List of active users logged in thru JAAS Hi, I'm using JAAS to authenticate users logging in against a database. I was wondering if there is any way to find out if a user's LoginContext has timed out (is active respectively). Thing is, for business logic reasons, we also have to keep information about all logged in users in a database table. If for some reason the client app hangs or the user doesn't log out properly these user record sets remain in the database. We're planning o
RE: [JBoss-user] Store large pdfs with JBoss
I'm using CMP entity beans, which means writing all that custom sql to handle BLOBs isn't possible. I switched to using MySQL and 10 minutes later everything worked perfectly. All i had to do was point my ejbs at MySQL and set the types for MySQLs type. -Original Message- From: Daniel Bruce Lynes [mailto:[EMAIL PROTECTED]] Sent: Friday, January 10, 2003 7:03 PM To: JBoss Users Subject: Re: [JBoss-user] Store large pdfs with JBoss On Saturday 04 January 2003 04:48, Pete Beck wrote: > I agree with Sun 100% on this. Using the file-system is bad news for > maintenance, scalability and as the article says security. > I've seen the chaos that using the filesystem can cause in clustered > environments and I would say avoid it if you can. > > Of course, the problem is Oracle seems to have totally pathetic support > for large objects from Java. However I am using Postgres and it works > like a charm. Postgres is more natural, yes. However, Oracle's support is still good. You just need to use a combination of the JDBC LOB support with the DBMS_LOB package. We use a combination of stored procedures that manipulate the LOB using DBMS_LOB.getlength(), DBMS_LOB.read(), DBMS_LOB.write(), and DBMS_LOB.copy(), in combination with the getBlob(), select, and select for update operations. Postgres is pretty much the same, but supports most of these operations directly from the JDBC driver, instead of through a database package for LOB operations. The only difference I can see from a usability standpoint, is Postgres lacks a copy operation. You would have to write a stored procedure in C I would imagine, to obtain this goal in Postgres. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues. http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] List of active users logged in thru JAAS
I've done a very similar solution. I had problems getting the HttpSessionListener to work so i used the HttpSessionAttributeListener instead. This meant that my solution was Jetty specific but in the end, that was ok. Here's the code, stripped of exception handling and such: public class HttpSessionEventHandler implements HttpSessionAttributeListener { public void attributeAdded( HttpSessionBindingEvent event ) { if ( "org.mortbay.jetty.Auth".equalsIgnoreCase( event.getName() ) ) { String sessionKey = event.getSession().getId(); String applicationKey = event.getSession().getServletContext().getServletContextName(); String userKey = event.getValue().toString(); MonitorService.getMonitorService().registerSession( sessionKey, userKey, applicationKey ); } } public void attributeRemoved( HttpSessionBindingEvent event ) { if ( "org.mortbay.jetty.Auth".equalsIgnoreCase( event.getName() ) ) { MonitorService.getMonitorService().removeSession( event.getSession().getId() ); } } public void attributeReplaced( HttpSessionBindingEvent event ) { } } Filter: public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException { //do this before hand so that the actual page that is displaying the results gets updated, but // it doens't work all the time before because the user might night be authenticated, thus // ignore any such error because it will be done after the request processing as well... HttpServletRequest httpRequest = ( HttpServletRequest ) request; MonitorService.getMonitorService().updateSession( httpRequest.getSession().getId() ); chain.doFilter( request, response ); HttpServletRequest httpRequest = ( HttpServletRequest ) request; MonitorService.getMonitorService().updateSession( httpRequest.getSession().getId() ); } The underlying storage of session tracking info can of course be done many ways, such as a singleton or MBean. Mine has the concept of applications and usernames. I use the session id for the uniquekey identifying the session in the service. enjoy. .peter -Original Message- From: Krishnakumar N [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 9:12 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] List of active users logged in thru JAAS We use a combination of a filter and a HttpSessionListener to achieve something like this (we do not store the list of currently stored users in a db). The filter checks whether the current user is logged in and if yes, adds the user id to a application context hashtable. The same hashtable is used by the same filter to prevent multiple simultaneous logins on the same userid. The timeout, in case of browser crash/hang/close, is handled via Session.setMaxInactiveInterval() along with the sessionDestroyed event handler in the HttpSessionListener . Cheers, Krishna -Original Message- From: Meyer-Willner, Bernhard [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 09, 2003 7:14 PM To: JBoss-User (E-Mail) Subject: [JBoss-user] List of active users logged in thru JAAS Hi, I'm using JAAS to authenticate users logging in against a database. I was wondering if there is any way to find out if a user's LoginContext has timed out (is active respectively). Thing is, for business logic reasons, we also have to keep information about all logged in users in a database table. If for some reason the client app hangs or the user doesn't log out properly these user record sets remain in the database. We're planning on running a scheduler MBean service that removes recordsets above a certain age from time to time. However, to be sure that the user isn't actively using our app/system any more we would like to check, if he's still authenticated in JBoss. Is there any way to find this out and get a list of active/logged on users, authenticated thru JAAS? Thanks for any ideas. Bernie This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld
[JBoss-user] Can I change the order that EJBs in my ejb-jar file load???
Is there a way to control the deploy order for ejbs? Such as the dependency declaration with MBeans? I have a MDB that is tied to a queue. It depends on 4 entity beans. If a message is written to the queue when my MDB is not deployed, and then i deploy it. It loads the MDB first, which immediately gets the queued message, so it tries to lookup the 4 other ejbs and of course can't because they haven't finished deploying yet. thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] Reducing size of ReadAhead with CMP in 3.0.4 (trying to track down an ORA-01745 error)
JBossCMP.pdf (in the paydocs) Chapter 6 is your best source of reference. Till then take a look at \docs\dtd\jbosscmp-jdbc_3_0.dtd. I believe your answer lies somewhere in the subelements. This may answer what you've asked for, but i'm not sure it will solve your actual problem. enjoy. .peter -Original Message- From: Thorbjørn Ravn Andersen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 08, 2003 7:40 AM To: [EMAIL PROTECTED] Subject: [JBoss-user] Reducing size of ReadAhead with CMP in 3.0.4 (trying to track down an ORA-01745 error) I am trying to use Middlegen against our Oracle 7 installation to create the files necessary to model the various tables as entity beans. My initial attempt with a small table with few rows worked well, but now I have tried with two larger tables, and then I consistently get "java.sql.SQLException: ORA-01745: invalid host/bind variable name". After having looked into the offending SQL call with a debugger, I can see that it is trying to load 100 rows using 100 primary keys each consisting of two fields. Since I cannot see that any fields should be misnamed (as indicated by the error message), I suspect that the database cannot hold such large prepared statements, and I would therefore like to reduce the ReadAhead cache. Browsing around in server/all/conf and server/all/deploy did not give me a clue, so now I ask here where this magic number is defined? If this is in the paydocs, I would appreciate a quick answer anyway. My manager is scheduled to wield his credit card tomorrow :( -- Thorbjørn Ravn Andersen Scandiatransplant Skejby Sygehus, indgang 3 +45 89 49 53 01 DK-8200 Århus N http://biobase.dk/~tra --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] EJB Deploy Order?
Is there a way to control the deploy order for ejbs? Such as the dependency declaration with MBeans? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] Store large pdfs with JBoss
Admittedly i don't know much about JCA. Does anyone have skeleton code or a sample they care to share? thanks. .peter -Original Message-From: Scott M Stark [mailto:[EMAIL PROTECTED]]Sent: Friday, January 03, 2003 2:37 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] Store large pdfs with JBoss Write a JCA adaptor for a file based persistent store. Scott StarkChief Technology OfficerJBoss Group, LLC - Original Message - From: Luttrell, Peter To: '[EMAIL PROTECTED]' Sent: Friday, January 03, 2003 11:37 AM Subject: RE: [JBoss-user] Store large pdfs with JBoss Actually i'm considering writing a little jmx service that manages the filesystem store. my ejbs would store the key that the jmx service requires. the service would then enforce/handle all such rules. I just read this however, which articulates some of the concerns with any filesystem approach: From http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html: Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors? Enterprise beans aren't allowed to access files primarily because files are not transactional resources. Allowing EJBs to access files or directories in the filesystem, or to use file descriptors, would compromise component distributability, and would be a security hazard. Another reason is deployability. The EJB container can choose to place an enterprise bean in any JVM, on any machine in a cluster. Yet the contents of a filesystem are not part of a deployment, and are therefore outside of the EJB container's control. File systems, directories, files, and especially file descriptors tend to be machine-local resources. If an enterprise bean running in a JVM on a particular machine is using or holding an open file descriptor to a file in the filesystem, that enterprise bean cannot easily be moved from one JVM or machine to another, without losing its reference to the file. Furthermore, giving EJBs access to the filesystem is a security hazard, since the enterprise bean could potentially read and broadcast the contents of sensitive files, or even upload and overwrite the JVM runtime binary for malicious purposes. Files are not an appropriate mechanism for storing business data for use by components, because they tend to be unstructured, are not under the control of the server environment, and typically don't provide distributed transactional access or fine-grained locking. Business data is better managed using a persistence interface such as JDBC, whose implementations usually provide these benefits. Read-only data can, however, be stored in files in a deployment JAR, and accessed with the getResource() or getResourceAsStream() methods of java.lang.Class. This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] Store large pdfs with JBoss
Actually i'm considering writing a little jmx service that manages the filesystem store. my ejbs would store the key that the jmx service requires. the service would then enforce/handle all such rules. I just read this however, which articulates some of the concerns with any filesystem approach: From http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html: Why can't EJBs read and write files and directories in the filesystem? And why can't they access file descriptors? Enterprise beans aren't allowed to access files primarily because files are not transactional resources. Allowing EJBs to access files or directories in the filesystem, or to use file descriptors, would compromise component distributability, and would be a security hazard. Another reason is deployability. The EJB container can choose to place an enterprise bean in any JVM, on any machine in a cluster. Yet the contents of a filesystem are not part of a deployment, and are therefore outside of the EJB container's control. File systems, directories, files, and especially file descriptors tend to be machine-local resources. If an enterprise bean running in a JVM on a particular machine is using or holding an open file descriptor to a file in the filesystem, that enterprise bean cannot easily be moved from one JVM or machine to another, without losing its reference to the file. Furthermore, giving EJBs access to the filesystem is a security hazard, since the enterprise bean could potentially read and broadcast the contents of sensitive files, or even upload and overwrite the JVM runtime binary for malicious purposes. Files are not an appropriate mechanism for storing business data for use by components, because they tend to be unstructured, are not under the control of the server environment, and typically don't provide distributed transactional access or fine-grained locking. Business data is better managed using a persistence interface such as JDBC, whose implementations usually provide these benefits. Read-only data can, however, be stored in files in a deployment JAR, and accessed with the getResource() or getResourceAsStream() methods of java.lang.Class. -Original Message-From: James Cleary [mailto:[EMAIL PROTECTED]]Sent: Friday, January 03, 2003 12:37 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] Store large pdfs with JBoss Our Product Data Manager system does the same. Just stores the files on disk with encrypted names. The database has the URLs to the correct PDF for a particular document number. We can reach those URLs on our Apache web server. If trying the JBoss route you could modify your $JAVA_HOME/jre/lib/security/java.policy file to ALL Permissions for your local disk drive. Not very portable then but depends on the application/environment. Not sure how you'd reference the PDFs though. Maybe placing your files under a webapp directory? - Original Message - From: Nelson, Tracy To: '[EMAIL PROTECTED]' Sent: Friday, January 03, 2003 1:07 PM Subject: RE: [JBoss-user] Store large pdfs with JBoss I've always done it with the filesystem. The database just stores the path to the file. Typically you establish some rules for the filesystem store (retention time, max space, maybe use quotas) and have it owned by whatever user the app server runs as. -Original Message-From: Luttrell, Peter [mailto:[EMAIL PROTECTED]]Sent: Friday, January 03, 2003 09:14To: [EMAIL PROTECTED]Subject: [JBoss-user] Store large pdfs with JBoss Has anyone had experience storing large pdfs with jboss, say ~5mbs each? I would like to do it with Oracle and BLOBs, but i've read that there's problems with the drivers and jboss and it doesn't look like it will be possible. Has anyone done with with any other database? Does anyone have ideas on how else to store these files, maybe without a database? I've always thought the filesystem was pretty much off limits from the appserver. thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it
[JBoss-user] Store large pdfs with JBoss
Has anyone had experience storing large pdfs with jboss, say ~5mbs each? I would like to do it with Oracle and BLOBs, but i've read that there's problems with the drivers and jboss and it doesn't look like it will be possible. Has anyone done with with any other database? Does anyone have ideas on how else to store these files, maybe without a database? I've always thought the filesystem was pretty much off limits from the appserver. thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
[JBoss-user] How to do BLOBs in Oracle?
Does anyone know how to get get BLOBs working in Oracle? I need to store some larger pdfs in the db and some of the bytes in the file are causing a causing a problem when stored as a varchar or CLOBs. I'm using Oracle9i and JBoss3.0.4. I have a CMP field of type Object. I have setup my jbosscmp-jdbc: Oracle9i And the standardjboscmp-jdbc.xml contains this under Oracle9i: java.lang.ObjectBLOBBLOB I have deployed the 9i drivers we got from oracle. The exact file name is ojdbc14.jar, which i guess reflects oracles new naming scheme. I call the setMyField(Object field) method and sent it a String. Then I call the getMyField method and it returns null. There is not errors in the log files. I had a dba trace my session and it is in fact getting to the db as "update mytable set myfield=:1 where mykey=:2". Is Jboss generating the correct SQL? Any ideas why this isn't working for me? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] Lookup MBean
Yep, just the few lines of code should do. .peter -Original Message-From: Scott M Stark [mailto:[EMAIL PROTECTED]]Sent: Thursday, November 14, 2002 7:27 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] Lookup MBean There is already an example of accessing the MBeanServer via the RMIAdaptor. You are looking for a non-external usage example of the MBeanServer? Scott StarkChief Technology OfficerJBoss Group, LLC - Original Message - From: Luttrell, Peter To: '[EMAIL PROTECTED]' Sent: Thursday, November 14, 2002 3:31 PM Subject: RE: [JBoss-user] Lookup MBean Cool, Thanks. We should probably see about weaving that into the jboss3 book. .peter -Original Message-From: Greg Turner [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 13, 2002 5:23 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] Lookup MBeanPeter,For use in your apps, the correct way is to get a reference to the MBeanServer and invoke methods on the MBean by passing object name, method name, method signature stuff to MBeanServer ref.#1 for use when the calling code is running in same JVM as MBeanServer: This is some simple code I wrote to access one of my own MBean from a servlet:public class FileSystem { public static void deleteFilesFromDirectory (String path, String[] excludedExtentions) { try { Object[] args = new Object[2]; args[0] = path; args[1] = excludedExtentions; String[] argClasses = new String[2]; argClasses[0] = "java.lang.String"; argClasses[1] = "java.lang.String[]"; getServer().invoke (getObjectName(), "deleteFilesFromDirectory", args, argClasses); } catch (Exception ex) { } } private static ObjectName getObjectName () throws Exception { return new ObjectName ("Tes:service=FileSystemService"); } private static MBeanServer getServer () throws Exception { return (MBeanServer)MBeanServerFactory.findMBeanServer(null).iterator().next(); }}#2 for use when the calling code is running in a different JVM from the MBeanServer This is an example I wrote to access MBean from main.public class Client { public static void main (String[] args) throws Exception { try { // Set up jndi properties Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); props.put(Context.PROVIDER_URL, "jnp://localhost:1099"); InitialContext ctx = new InitialContext(props); System.out.println ("Got context"); // Retrieve the RMI adaptor, can see this in jmx console Object obj = ctx.lookup("jmx::rmi"); System.out.println ("Got RMI Adapter"); ctx.close(); // Wrap it in a connector RemoteMBeanServer server = new RMIConnectorImpl((RMIAdaptor)obj); // add your code here to call invoke method on server just like above. } catch (Exception ex) { ex.printStackTrace(); } }}#3 for calling simple methods on MBeanServer from html. See implementation of jmx-console.Hope this helps.GregLuttrell, Peter wrote: I have a custom JMX MBean. What is the 'correct' way to look it up for use in my apps (webapps if it matters)? I know i could manually bind it the jndi tree, or create a singleton like accessor method, but what is considered the 'correct' way to access the bean? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. A
RE: [JBoss-user] Lookup MBean
Cool, Thanks. We should probably see about weaving that into the jboss3 book. .peter -Original Message-From: Greg Turner [mailto:[EMAIL PROTECTED]]Sent: Wednesday, November 13, 2002 5:23 PMTo: [EMAIL PROTECTED]Subject: Re: [JBoss-user] Lookup MBeanPeter,For use in your apps, the correct way is to get a reference to the MBeanServer and invoke methods on the MBean by passing object name, method name, method signature stuff to MBeanServer ref.#1 for use when the calling code is running in same JVM as MBeanServer: This is some simple code I wrote to access one of my own MBean from a servlet:public class FileSystem { public static void deleteFilesFromDirectory (String path, String[] excludedExtentions) { try { Object[] args = new Object[2]; args[0] = path; args[1] = excludedExtentions; String[] argClasses = new String[2]; argClasses[0] = "java.lang.String"; argClasses[1] = "java.lang.String[]"; getServer().invoke (getObjectName(), "deleteFilesFromDirectory", args, argClasses); } catch (Exception ex) { } } private static ObjectName getObjectName () throws Exception { return new ObjectName ("Tes:service=FileSystemService"); } private static MBeanServer getServer () throws Exception { return (MBeanServer)MBeanServerFactory.findMBeanServer(null).iterator().next(); }}#2 for use when the calling code is running in a different JVM from the MBeanServer This is an example I wrote to access MBean from main.public class Client { public static void main (String[] args) throws Exception { try { // Set up jndi properties Properties props = new Properties(); props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); props.put(Context.PROVIDER_URL, "jnp://localhost:1099"); InitialContext ctx = new InitialContext(props); System.out.println ("Got context"); // Retrieve the RMI adaptor, can see this in jmx console Object obj = ctx.lookup("jmx::rmi"); System.out.println ("Got RMI Adapter"); ctx.close(); // Wrap it in a connector RemoteMBeanServer server = new RMIConnectorImpl((RMIAdaptor)obj); // add your code here to call invoke method on server just like above. } catch (Exception ex) { ex.printStackTrace(); } }}#3 for calling simple methods on MBeanServer from html. See implementation of jmx-console.Hope this helps.GregLuttrell, Peter wrote: I have a custom JMX MBean. What is the 'correct' way to look it up for use in my apps (webapps if it matters)? I know i could manually bind it the jndi tree, or create a singleton like accessor method, but what is considered the 'correct' way to access the bean? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.-- Greg Turner, JBoss Authorized Consultant Tiburon Enterprise Systems http://www.tiburon-e-systems.com Box 1171 Tiburon, CA 94920 415-927-2543 This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this da
[JBoss-user] Lookup MBean
I have a custom JMX MBean. What is the 'correct' way to look it up for use in my apps (webapps if it matters)? I know i could manually bind it the jndi tree, or create a singleton like accessor method, but what is considered the 'correct' way to access the bean? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] cmp performance
You might find interesting a couple of threads i've started over the last couple of weeks on this list. In one, i included code to benchmark the cache performance. .peter > -Original Message- > From: Eric Kaplan [mailto:eric.kaplan@;armanta.com] > Sent: Monday, November 11, 2002 9:07 AM > To: Jboss-User > Subject: [JBoss-user] cmp performance > > Hi > > We have an application that is used by portfolio managers to manage money. > They manage one or more portfolios, where a portfolio consists of one or > more positions. Each position corresponds to an asset (a given asset can > be associated with multiple positions), and the asset is associated with > pricing information. So, it's like: > > Portfolio---Asset---Valuation > > A given portfolio might contain anywhere from 50 to 500 positions. In > addition, a position is represented by data scattered across several > tables. Same for asset and valuation. When we go to the app server to > grab the data today, we make 3 separate calls for each portfolio > performing bulk data loads directly against the database (not loading > entity beans, but directly from the session beans), to load first all > positions for a portfolio, then all assets for each portfolio, then all > valuations for each portfolio. Each query could join against several > tables. > > Since we're going directly against the database, we have a couple of > problems. One, we're not taking advantage of cacheing of beans on the app > server. Two, if we are in the middle of updating a position through a > bean, by going directly against the database we're not ensured consistency > until the change to the position bean is comitted. We'd much rather make > use of the ejb container for everything. We haven't historically because > trying to load 500 positions using a finder method was extremely slow. > What I would like to do is find a portfolio bean and have the portfolio > bean return a collection of cached positions. I'm about to investigate > using CMP and was wondering if anyone could tell me if I should even > bother or if I should stick with my bulk data loads. Are there any kind > of performance benchmarks, etc. I'd like to take advantage of what the > container has to offer if possible, and it seems as if great strides have > been made with cmp- for example, i understand that doing a finder method > will in fact load the data at the same time instead of just the primary > keys to avoid selecting one entity at a time (in fact i'd imagine this as > a great differentiating factor between app servers - and besides, i know > dain is a smart guy :)). > > Regards > > Eric Kaplan > Armanta, Inc. > 55 Madison Ave. > Morristown, NJ 07960 > Phone: (973) 326-9600 > > > > This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd522.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Problem connecting XP to Linux
OIL (jndi=ConnectionFactoyr) can be a bit touchy. Make sure that the jars are the exact same version with the server. Also various different jdk versions could be a problem. If you are more interested in reliablity vs performance then use RMI instead. I think the jndi name is RMIConnectionFactory. The various options are documented in the main 3.0 book. .peter -Original Message- From: Tiburon Enterprise [mailto:gturner@;tiburon-e-systems.com] Sent: Monday, November 11, 2002 2:27 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] Problem connecting XP to Linux I'm using JBoss 3.0.4 on XP and Linux machines. The XP client program establishes an InitalContext to the Linux machine and then executes this code which hangs: QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory)ctx.lookup ("ConnectionFactory"); I've verified with jmx-console and jndiview that the connection factory is there on the linux machine. Any pointers as to why this hangs? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd522.html ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] User Monitoring
I solved the problem. For New Session and Removals, this works (although it's jetty specific): public class JettyAuthenticationTracker implements HttpSessionAttributeListener { public void attributeAdded( HttpSessionBindingEvent event ) { if ( "org.mortbay.jetty.Auth".equalsIgnoreCase( event.getName() ) ) { getMonitorService().registerSession( event.getValue().toString() ); } } public void attributeRemoved( HttpSessionBindingEvent event ) { if ( "org.mortbay.jetty.Auth".equalsIgnoreCase( event.getName() ) ) { getMonitorService().removeSession( event.getValue().toString() ); } } public void attributeReplaced( HttpSessionBindingEvent event ) { } } And I used a Servlet Filter for updates. Thanks for the pointer on what direction to look. .peter -Original Message-From: Luttrell, Peter [mailto:[EMAIL PROTECTED]]Sent: Friday, November 08, 2002 6:18 PMTo: '[EMAIL PROTECTED]'Subject: RE: [JBoss-user] User Monitoring Ah, a part of the servlet api i haven't yet explored. I tried it and it didn't quite work. I wonder if i have it correct. Based on my sample code, when I first go to a page i see this: 18:11:44,875 INFO [STDOUT] sessionCreated Called.18:11:44,890 INFO [STDOUT] httpsessionevent=javax.servlet.http.HttpSessionEvent[source=org.mortbay.jetty.servlet.HashSessionManager$Session@965654]18:11:44,890 INFO [STDOUT] source=org.mortbay.jetty.servlet.HashSessionManager$Session@96565418:11:44,890 INFO [STDOUT] sessiontype=class org.mortbay.jetty.servlet.HashSessionManager$Session18:11:44,890 INFO [STDOUT] id=1yr4680607tip18:11:44,890 INFO [STDOUT] AttributeNames: But that's it. When I navigate to the login page and login, i don't get any more trace. Any ideas? Here is the code i'm using to investigate: import javax.servlet.http.*;import java.util.Enumeration; public class HttpSessionEventHandler implements HttpSessionListener, HttpSessionBindingListener { public void sessionCreated(HttpSessionEvent se) { System.out.println( "sessionCreated Called." ); System.out.println( "httpsessionevent=" + se ); HttpSession session = se.getSession(); if (session != null){ System.out.println("source=" + se.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attributes.hasMoreElements()){ System.out.println( "\t" + attributes.nextElement().toString() ); } } else { System.out.println( "getSession() returned null." ); } } public void sessionDestroyed(HttpSessionEvent se){ System.out.println( "sessionDestroyed Called." ); System.out.println( "httpsessionevent=" + se ); HttpSession session = se.getSession(); if (session != null){ System.out.println("source=" + se.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attributes.hasMoreElements()){ System.out.println( "\t" + attributes.nextElement().toString() ); } } else { System.out.println( "getSession() returned null." ); } } public void valueBound(HttpSessionBindingEvent event) { System.out.println( "valueBound Called." ); System.out.println( "name=" + event.getName()); System.out.println( "value=" + event.getValue() ); System.out.println( "HttpSessionBindingEvent=" + event ); HttpSession session = event.getSession(); if (session != null){ System.out.println("source=" + event.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attribu
RE: [JBoss-user] User Monitoring
Ah, a part of the servlet api i haven't yet explored. I tried it and it didn't quite work. I wonder if i have it correct. Based on my sample code, when I first go to a page i see this: 18:11:44,875 INFO [STDOUT] sessionCreated Called.18:11:44,890 INFO [STDOUT] httpsessionevent=javax.servlet.http.HttpSessionEvent[source=org.mortbay.jetty.servlet.HashSessionManager$Session@965654]18:11:44,890 INFO [STDOUT] source=org.mortbay.jetty.servlet.HashSessionManager$Session@96565418:11:44,890 INFO [STDOUT] sessiontype=class org.mortbay.jetty.servlet.HashSessionManager$Session18:11:44,890 INFO [STDOUT] id=1yr4680607tip18:11:44,890 INFO [STDOUT] AttributeNames: But that's it. When I navigate to the login page and login, i don't get any more trace. Any ideas? Here is the code i'm using to investigate: import javax.servlet.http.*;import java.util.Enumeration; public class HttpSessionEventHandler implements HttpSessionListener, HttpSessionBindingListener { public void sessionCreated(HttpSessionEvent se) { System.out.println( "sessionCreated Called." ); System.out.println( "httpsessionevent=" + se ); HttpSession session = se.getSession(); if (session != null){ System.out.println("source=" + se.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attributes.hasMoreElements()){ System.out.println( "\t" + attributes.nextElement().toString() ); } } else { System.out.println( "getSession() returned null." ); } } public void sessionDestroyed(HttpSessionEvent se){ System.out.println( "sessionDestroyed Called." ); System.out.println( "httpsessionevent=" + se ); HttpSession session = se.getSession(); if (session != null){ System.out.println("source=" + se.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attributes.hasMoreElements()){ System.out.println( "\t" + attributes.nextElement().toString() ); } } else { System.out.println( "getSession() returned null." ); } } public void valueBound(HttpSessionBindingEvent event) { System.out.println( "valueBound Called." ); System.out.println( "name=" + event.getName()); System.out.println( "value=" + event.getValue() ); System.out.println( "HttpSessionBindingEvent=" + event ); HttpSession session = event.getSession(); if (session != null){ System.out.println("source=" + event.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attributes.hasMoreElements()){ System.out.println( "\t" + attributes.nextElement().toString() ); } } else { System.out.println( "getSession() returned null." ); } } public void valueUnbound(HttpSessionBindingEvent event) { System.out.println( "valueUnbound Called." ); System.out.println( "name=" + event.getName()); System.out.println( "value=" + event.getValue() ); System.out.println( "HttpSessionBindingEvent=" + event ); HttpSession session = event.getSession(); if (session != null){ System.out.println("source=" + event.getSource()); System.out.println( "sessiontype=" + session.getClass() ); System.out.println( "id=" + session.getId()); System.out.println( "AttributeNames:" ); Enumeration attributes = session.getAttributeNames(); while (attributes.hasMoreElements()){ System.out.println( "\t" + attributes.nextElement().toString() ); } } else { System.out.println( "getSession() returned null." ); } }} -----Original Message-From: Jason Westra [mailto:[EM
RE: [JBoss-user] User Monitoring
This sounds interesting. Presumably I can get the UserPrincipal somehow right? Where do i get more info on HttpBindingListener? It doesn't appear to be a Jboss class, nor a j2ee class. Did you mean HttpSessionListener? thanks. .peter -Original Message-From: Jason Westra [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 05, 2002 12:14 AMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] User Monitoring You make the custom solution sound way too hard! It is quite easy. You need 2 classes. 1 Class implementing HttpBindingListener called MonitoredUser.java 1 MBean called CurrentUsersMBean.java, which holds a list of MonitoredUser objects representing currently logged in users. When the user logs in, create a session, create and bind the MonitoredUser instance to the session, and add it to the CurrentUsersMBean list. To see a list of currently logged in users, ask the CurrentUsersMBean for its list. When the session times out, or the user logs off, the MonitoredUser.unbind() method is called. At this time, remove the object from the CurrentUsersMBean list. Jason -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Luttrell, PeterSent: Monday, November 04, 2002 5:02 PMTo: [EMAIL PROTECTED]Subject: [JBoss-user] User Monitoring My sysadmin has one large grip with JBoss: There is no way to tell who is using a webapp at a particular time, which he claims is possible with Weblogic. I'm using Jetty, if i turn on the metrics, i can ascertain how many sessions are active (not timed out). Does anyone know how i can figure out what the userPrincipal is for the httpsessions? Or does anyone have any other ideas on how to monitor Who is using Jboss? Other then the obvious one, which is write a bunch of custom code that updates some custom monitor through filters or interceptors or manually? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] CMR Performance: Weblogic7 Much Faster Then JBoss
The comparison does become apples to oranges once you swap the os and hardware. My tests were all on w2k p41.7ghz 512mbs RDRam, jdk1.4.1_01. Weblogic I think uses it's own copy of the jre which i think is something like 1.3.1. You are correct, i am using a completely unmodified jboss3.0.4 install. It is a little interesting that there is such a disparity between your first and second retrieval, considering that the objects should be in cache already (inserts). .peter -Original Message- From: Christian Riege [mailto:criege@;riege.com] Sent: Friday, November 08, 2002 4:17 AM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] CMR Performance: Weblogic7 Much Faster Then JBoss Peter, there are lies, damn lies and benchmarks. First of all, thanks for the supplied test and sources. Second, I've run the tests on my machine (1GHz AMD, .5GB RAM, Linux Kernel 2.4.18, JVM 1.4.0_02). I know that any comparisons to your systems are probably apples and oranges (you're on a Windows box, right?), but I'm getting significantly different numbers. JBoss version is Branch_3_0 as per CVS 15 minutes ago: [Server] JBoss (MX MicroKernel) [3.0.5RC1 Date:200211081043] Started in 0m:41s:32ms > 14:31:46,328 INFO [STDOUT] Initial Retrival, beans may or maynot be in > cache. > 14:31:46,375 INFO [STDOUT] finder took 47ms. > 14:31:49,140 INFO [STDOUT] External ValueObject creation took 2765ms > for 1000 objects. > 14:31:49,859 INFO [STDOUT] Internal ValueObject creation took 719ms for > 1000 objects. > 14:31:49,859 INFO [STDOUT] Secondary Retrival, beans are in cache. > 14:31:50,125 INFO [STDOUT] finder took 266ms. > 14:31:52,765 INFO [STDOUT] External ValueObject creation took 2640ms > for 1000 objects. > 14:31:53,437 INFO [STDOUT] Internal ValueObject creation took 672ms for > 1000 objects. it's odd but it seems that you are not getting any significant performance increase on the second run. my logfile states: creating 1000 Blobs... Creation complete, took 29046ms. testing retrival speed... Initial Retrival, beans may or maynot be in cache. finder took 265ms. External ValueObject creation took 4859ms for 1000 objects. Internal ValueObject creation took 1497ms for 1000 objects. Secondary Retrival, beans are in cache. finder took 1334ms. External ValueObject creation took 2994ms for 1000 objects. Internal ValueObject creation took 679ms for 1000 objects. As you can see I have a significant performance increase between the initial and the secondary retrieval. Every time I call your Test program again afterwards (w/o restarting JBoss), I'm getting roughly the figures of the Secondary Retrieval in both cases which hints that the Entity Beans are retrieved from cache rather than from the DB. You _are_ running a vanilla 3.0.4 system w/ no changes to the configuration files, aren't you? I'll try to pipe this through OptimizeIt to see where JBoss spends its time during the test. Unfortunately I don't have the time to get WebLogic 7 up and running to get a good comparison vs. JBoss. Best regards, Christian --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] CMR Performance: Weblogic7 Much Faster Then JBoss
Over the last couple of weeks i started a couple threads about CMP performance in JBoss. Bill asked for comparison with what Weblogic can do, so i got my test case to work with it and the results speak for themselves. -> Weblogic 7 is 330% to 715% faster then JBoss3.0.4 in the one test that I did. All code used is attached. Output. Reference the other email threads for an overview of what I'm doing in the code and the confirmation that read-aheads are configured properly...or just look at the code/deployment descriptors. JBoss3.0.4: 14:31:36,312 INFO [STDOUT] creating 1000 Blobs...14:31:43,968 INFO [STDOUT] Creation complete, took 7656ms.14:31:46,328 INFO [STDOUT] testing retrival speed...14:31:46,328 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.14:31:46,375 INFO [STDOUT] finder took 47ms.14:31:49,140 INFO [STDOUT] External ValueObject creation took 2765ms for 1000 objects.14:31:49,859 INFO [STDOUT] Internal ValueObject creation took 719ms for 1000 objects.14:31:49,859 INFO [STDOUT] Secondary Retrival, beans are in cache.14:31:50,125 INFO [STDOUT] finder took 266ms.14:31:52,765 INFO [STDOUT] External ValueObject creation took 2640ms for 1000 objects.14:31:53,437 INFO [STDOUT] Internal ValueObject creation took 672ms for 1000 objects. Note the 672 on the last line. With all of the object cached (which they will be), this is what would happen in production. Weblogic7: creating 1000 Blobs...Creation complete, took 10297ms.testing retrival speed...Initial Retrival, beans may or maynot be in cache. finder took 422ms. External ValueObject creation took 8906ms for 1000 objects. Internal ValueObject creation took 47ms for 1000 objects.Secondary Retrival, beans are in cache. finder took 235ms. External ValueObject creation took 171ms for 1000 objects. Internal ValueObject creation took 47ms for 1000 objects. Note the 47ms on the last line. With all of the object cached (which they will be), this is what would happen in production. In other runs, i've seen this number as low as 31ms. So for the findAll and get all data: JBoss External ValueObject Creation: 266 + 2640 = 2906 JBoss Internal ValueObject Creation: 266 + 672 = 939 Weblogic External ValueObject Creation: 235 + 171 = 406 (715% faster) Weblogic Internal ValueObject Creation: 235 + 47 = 282 (330% faster) Side notes: With Weblogic i was going against Oracle vs Hypersonic in JBoss. This explains the difference in the initial reading in of the beans. But since both examples are 100% cached beans the db should not matter, except for the finder methods call to get all primary keys from db. Closing Notes: I am a big JBoss fan. I would like these numbers to be totally wrong, or for me to have misconfigured JBoss in some way. If you can get JBoss to perform better then this, PLEASE tell us all how. All the code is attached. .peter y's crazy warning message below> This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. jboss.zip Description: Binary data weblogic.zip Description: Binary data
RE: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)
I am totally grateful for the time that Dain spent. He wrote a rockin CMP engine and I enjoy using it. Unfortunately in the case of CMRs it doesn't perform so nicely. Since Dain has spent so much time, he is the best person to performance tweak it. I am not. .peter -Original Message- From: Hunter Hillegas [mailto:lists@;lastonepicked.com] Sent: Thursday, November 07, 2002 1:38 PM To: JBoss User Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help) With that attitude I doubt this will get the kind of attention you probably want it to... This is open source. Dain spent countless hours creating the damn thing... Maybe a little bit of your time in OptimizeIt helping the cause would kill you... But I doubt it. > From: "Luttrell, Peter" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > Date: Thu, 7 Nov 2002 10:14:16 -0600 > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Subject: RE: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng > Help) > > I'll leave you to debug and optimize your own code. > > .peter > > -Original Message- > From: Dain Sundstrom [mailto:dain@;daingroup.com] > Sent: Wednesday, November 06, 2002 8:53 PM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance > Tuni ng Help) > > > Well, it should be fast then. Now is when you fire up OptimizeIt and > findout what part of my code is wasting all that time. > > -dain > > Luttrell, Peter wrote: >> No i did not see that email. >> >> I am using commit option A. The first time that I run through all beans, > the >> main ones as well as the relationship ones should all get cached, right? >> >> If this is correct then my question stands because the times that i posted >> were the 4th read. >> >> Please see the code that I posted with the original message. I think you >> might have been the one who asked for the sample. >> >> .peter >> >> -Original Message- >> From: Dain Sundstrom [mailto:dain@;daingroup.com] >> Sent: Wednesday, November 06, 2002 5:39 PM >> To: [EMAIL PROTECTED] >> Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance >> Tuni ng Help) >> >> >> Did you miss my email? It is slow because there is no way to readahead >> across a cmr on-find in response to a query. This will eventually be >> in, but it is not not, so you get a query for each cmr you load. If you >> use commit option A all data will be eventually be cached so it will be >> fast. In future release the readahead will be more flexible. >> >> -dain >> >> Luttrell, Peter wrote: >> >>> Changing the readahead strategy should not change the results i've >>> posted, as i run though the beans once, hense they are loaded. >>> >>> So back to the questions: Is it acceptable that adding 2 cmrs takes 450% >>> the time >>> >>>-Original Message- >>>From: Herve Tchepannou [mailto:htchepannou@;objexis.com] >>>Sent: Tuesday, November 05, 2002 3:38 PM >>>To: [EMAIL PROTECTED] >>>Subject: RE: [JBoss-user] CMRs are Slow (was: Entity Bean >>>Performance Tuni ng Help) >>> >>>1. What's the read-ahead/strategy of findAll() ? Since you want to >>>get all the beans value object, it should be set to on-find, >>>otherwhise, you are going to have the N+1 finder problem >>>2. Since you're populating the ValueObject with the content of your >>>CMR fields, because each access to the CMR fields will call their >>>findByPrimaryKey() to load them. Me, I always load CMR when needed. >>>If they are always needed, then I use de Dependant Value Class >>>3. Internal/External ValueObject creation. This make sense because >>>in the external, each call of a getter from the ValueObject passes >>>via the beanProxy (+ interceptors), where in the internal case you >>>are already in the bean, then no overhead of the beanProxy >>>4. It may be interesting to see the result if you load all the 1000 >>>beans, but return just a page of 25 ValueObjects, which is how most >>>web-pages works to avoid those performance problems - then, make >>>sure that the read-ahead strategy of the findAll() is set to on-load >>> >>>-Original Message- >>>From: Luttrell, Peter [mailto:PLuttrell@;starkinvestments.com] >>>Sent: Tuesday, November 05, 2002 4:00 PM &g
RE: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)
I'll leave you to debug and optimize your own code. .peter -Original Message- From: Dain Sundstrom [mailto:dain@;daingroup.com] Sent: Wednesday, November 06, 2002 8:53 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help) Well, it should be fast then. Now is when you fire up OptimizeIt and findout what part of my code is wasting all that time. -dain Luttrell, Peter wrote: > No i did not see that email. > > I am using commit option A. The first time that I run through all beans, the > main ones as well as the relationship ones should all get cached, right? > > If this is correct then my question stands because the times that i posted > were the 4th read. > > Please see the code that I posted with the original message. I think you > might have been the one who asked for the sample. > > .peter > > -Original Message- > From: Dain Sundstrom [mailto:dain@;daingroup.com] > Sent: Wednesday, November 06, 2002 5:39 PM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance > Tuni ng Help) > > > Did you miss my email? It is slow because there is no way to readahead > across a cmr on-find in response to a query. This will eventually be > in, but it is not not, so you get a query for each cmr you load. If you > use commit option A all data will be eventually be cached so it will be > fast. In future release the readahead will be more flexible. > > -dain > > Luttrell, Peter wrote: > >>Changing the readahead strategy should not change the results i've >>posted, as i run though the beans once, hense they are loaded. >> >>So back to the questions: Is it acceptable that adding 2 cmrs takes 450% >>the time >> >>-Original Message- >>From: Herve Tchepannou [mailto:htchepannou@;objexis.com] >>Sent: Tuesday, November 05, 2002 3:38 PM >>To: [EMAIL PROTECTED] >>Subject: RE: [JBoss-user] CMRs are Slow (was: Entity Bean >>Performance Tuni ng Help) >> >>1. What's the read-ahead/strategy of findAll() ? Since you want to >>get all the beans value object, it should be set to on-find, >>otherwhise, you are going to have the N+1 finder problem >>2. Since you're populating the ValueObject with the content of your >>CMR fields, because each access to the CMR fields will call their >>findByPrimaryKey() to load them. Me, I always load CMR when needed. >>If they are always needed, then I use de Dependant Value Class >>3. Internal/External ValueObject creation. This make sense because >>in the external, each call of a getter from the ValueObject passes >>via the beanProxy (+ interceptors), where in the internal case you >>are already in the bean, then no overhead of the beanProxy >>4. It may be interesting to see the result if you load all the 1000 >> beans, but return just a page of 25 ValueObjects, which is how most >>web-pages works to avoid those performance problems - then, make >>sure that the read-ahead strategy of the findAll() is set to on-load >> >>-Original Message- >>From: Luttrell, Peter [mailto:PLuttrell@;starkinvestments.com] >>Sent: Tuesday, November 05, 2002 4:00 PM >>To: '[EMAIL PROTECTED]' >>Subject: [JBoss-user] CMRs are Slow (was: Entity Bean Performance >>Tuning Help) >> >>The "Entity Bean Performance Tuning Help" thread went off in >>various different directions. The thread begged a sample and a >>little more detail as to what was slow. I've identified the >>problem to be (CMRs) and provided a full sample (attached). >> >>Lets rehash what i'm testing: >> >>The code runs inside of a SSB with a transaction on each >>method vs servlet (struts action) + manual transaction as in the >>real app. I use hypersonic vs oracle in my real app. >> >>calls findAll() >>dumps out the time >> >>iterates through each calling all methods and building a >>valueobject. >>this should cache all results (checkout my jboss.xml) >> >>iterates through each calling all methods and building a >>valueobject (a 2nd time) >>dumps out the time >> >>iterates through each and calling 1 method on ejb, which >>builds the valueob
RE: [JBoss-user] Entity Bean Performance Tuning Help
I just tested on JBoss3.0.4 (all previous tests were on 3.0.3). The times are not any better. Heres the output: 19:45:41,671 INFO [STDOUT] testing retrival speed... 19:45:41,671 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache. 19:45:41,937 INFO [STDOUT] finder took 266ms. 19:45:44,640 INFO [STDOUT] External ValueObject creation took 2703ms for 1000 objects. 19:45:45,343 INFO [STDOUT] Internal ValueObject creation took 703ms for 1000 objects. 19:45:45,343 INFO [STDOUT] Secondary Retrival, beans are in cache. 19:45:45,546 INFO [STDOUT] finder took 203ms. 19:45:48,203 INFO [STDOUT] External ValueObject creation took 2657ms for 1000 objects. 19:45:48,890 INFO [STDOUT] Internal ValueObject creation took 687ms for 1000 objects. -Original Message- From: Stephen Coy [mailto:steve@;whitesmiths.com.au] Sent: Tuesday, November 05, 2002 5:29 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help Hi, Have you tried your tests out on 3.0.4 yet? Some CMR performance optimisations made it into 3.0.4, because we desperately needed them for our own application. Steve Coy On Wednesday, November 6, 2002, at 06:37 AM, Luttrell, Peter wrote: > Nope it's defiantly cached. > > The first time it takes almost 12,000ms to build the beans. Yes that > is 10 > times slower...course it does have to initiate the db connections, and > the > db isn't very fast. > > .peter > > -Original Message- > From: Dain Sundstrom [mailto:dain@;daingroup.com] > Sent: Monday, November 04, 2002 7:09 PM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help > > > Luttrell, Peter wrote: >> It is faster. I tried it in response to danch's message early in the > thread. >> >> Thus I have the same question (which no one commented on): "Time >> ~1200ms > is >> a lot better then the original 2200, but can this still be acceptable >> for >> reading ~10 fields from 750ejbs that are 100% cached?" >> >> Here is the email in this thread reporting the results: > > I think you will get the same answer, run a profiler and find out what > is taking the 1200 ms. It should be obvious. If you can't fix > whatever > is taking all the time, come back and complain about "x" being really > slow. My guess is the data isn't cached and it is taking 1199 ms to > get > it from the database and 1 ms to build the value object. > > -dain --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)
No i did not see that email. I am using commit option A. The first time that I run through all beans, the main ones as well as the relationship ones should all get cached, right? If this is correct then my question stands because the times that i posted were the 4th read. Please see the code that I posted with the original message. I think you might have been the one who asked for the sample. .peter -Original Message- From: Dain Sundstrom [mailto:dain@;daingroup.com] Sent: Wednesday, November 06, 2002 5:39 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help) Did you miss my email? It is slow because there is no way to readahead across a cmr on-find in response to a query. This will eventually be in, but it is not not, so you get a query for each cmr you load. If you use commit option A all data will be eventually be cached so it will be fast. In future release the readahead will be more flexible. -dain Luttrell, Peter wrote: > Changing the readahead strategy should not change the results i've > posted, as i run though the beans once, hense they are loaded. > > So back to the questions: Is it acceptable that adding 2 cmrs takes 450% > the time > > -Original Message- > From: Herve Tchepannou [mailto:htchepannou@;objexis.com] > Sent: Tuesday, November 05, 2002 3:38 PM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] CMRs are Slow (was: Entity Bean > Performance Tuni ng Help) > > 1. What's the read-ahead/strategy of findAll() ? Since you want to > get all the beans value object, it should be set to on-find, > otherwhise, you are going to have the N+1 finder problem > 2. Since you're populating the ValueObject with the content of your > CMR fields, because each access to the CMR fields will call their > findByPrimaryKey() to load them. Me, I always load CMR when needed. > If they are always needed, then I use de Dependant Value Class > 3. Internal/External ValueObject creation. This make sense because > in the external, each call of a getter from the ValueObject passes > via the beanProxy (+ interceptors), where in the internal case you > are already in the bean, then no overhead of the beanProxy > 4. It may be interesting to see the result if you load all the 1000 > beans, but return just a page of 25 ValueObjects, which is how most > web-pages works to avoid those performance problems - then, make > sure that the read-ahead strategy of the findAll() is set to on-load > > -Original Message- > From: Luttrell, Peter [mailto:PLuttrell@;starkinvestments.com] > Sent: Tuesday, November 05, 2002 4:00 PM > To: '[EMAIL PROTECTED]' > Subject: [JBoss-user] CMRs are Slow (was: Entity Bean Performance > Tuning Help) > > The "Entity Bean Performance Tuning Help" thread went off in > various different directions. The thread begged a sample and a > little more detail as to what was slow. I've identified the > problem to be (CMRs) and provided a full sample (attached). > > Lets rehash what i'm testing: > > The code runs inside of a SSB with a transaction on each > method vs servlet (struts action) + manual transaction as in the > real app. I use hypersonic vs oracle in my real app. > > calls findAll() > dumps out the time > > iterates through each calling all methods and building a > valueobject. > this should cache all results (checkout my jboss.xml) > > iterates through each calling all methods and building a > valueobject (a 2nd time) > dumps out the time > > iterates through each and calling 1 method on ejb, which > builds the valueobject internally > dumps out the time > > I'm mostly concerned with the last time, as it's what i do in my > real case...because it's the fastest. > > The entitybean has 2 CMRs. The read-all+fields time for 1000 > cached beans using internal valueobject generation takes about > 670ms. But with 1 cmr it only takes 350ms. And with No cmrs it > only takes 150ms. [if you want slightly modified code, let me > know]. > > Now 150ms is great! But 350 isn't. It's more then double. Is > this acceptable? Add a few more and it's unusable for a lot of > applications. > > Arguably cmp EntityBeans w
RE: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help)
Changing the readahead strategy should not change the results i've posted, as i run though the beans once, hense they are loaded. So back to the questions: Is it acceptable that adding 2 cmrs takes 450% the time -Original Message-From: Herve Tchepannou [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 05, 2002 3:38 PMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuni ng Help) 1. What's the read-ahead/strategy of findAll() ? Since you want to get all the beans value object, it should be set to on-find, otherwhise, you are going to have the N+1 finder problem 2. Since you're populating the ValueObject with the content of your CMR fields, because each access to the CMR fields will call their findByPrimaryKey() to load them. Me, I always load CMR when needed. If they are always needed, then I use de Dependant Value Class 3. Internal/External ValueObject creation. This make sense because in the external, each call of a getter from the ValueObject passes via the beanProxy (+ interceptors), where in the internal case you are already in the bean, then no overhead of the beanProxy 4. It may be interesting to see the result if you load all the 1000 beans, but return just a page of 25 ValueObjects, which is how most web-pages works to avoid those performance problems - then, make sure that the read-ahead strategy of the findAll() is set to on-load -Original Message-From: Luttrell, Peter [mailto:[EMAIL PROTECTED]]Sent: Tuesday, November 05, 2002 4:00 PMTo: '[EMAIL PROTECTED]'Subject: [JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuning Help) The "Entity Bean Performance Tuning Help" thread went off in various different directions. The thread begged a sample and a little more detail as to what was slow. I've identified the problem to be (CMRs) and provided a full sample (attached). Lets rehash what i'm testing: The code runs inside of a SSB with a transaction on each method vs servlet (struts action) + manual transaction as in the real app. I use hypersonic vs oracle in my real app. calls findAll() dumps out the time iterates through each calling all methods and building a valueobject. this should cache all results (checkout my jboss.xml) iterates through each calling all methods and building a valueobject (a 2nd time) dumps out the time iterates through each and calling 1 method on ejb, which builds the valueobject internally dumps out the time I'm mostly concerned with the last time, as it's what i do in my real case...because it's the fastest. The entitybean has 2 CMRs. The read-all+fields time for 1000 cached beans using internal valueobject generation takes about 670ms. But with 1 cmr it only takes 350ms. And with No cmrs it only takes 150ms. [if you want slightly modified code, let me know]. Now 150ms is great! But 350 isn't. It's more then double. Is this acceptable? Add a few more and it's unusable for a lot of applications. Arguably cmp EntityBeans were worthless till ejb2.0 and CMRs came along. But to actually use them in JBoss is suicide for performance. The attached sample has a test class called "Test", which can be run with -c to generate 1000 test rows. Also included is an ant script which builds the test beans and deploys them to jboss, if you set your jboss.install path in build.properties. Here the actual output from my last test run: 14:31:36,312 INFO [STDOUT] creating 1000 Blobs...14:31:43,968 INFO [STDOUT] Creation complete, took 7656ms.14:31:46,328 INFO [STDOUT] testing retrival speed...14:31:46,328 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.14:31:46,375 INFO [STDOUT] finder took 47ms.14:31:49,140 INFO [STDOUT] External ValueObject creation took 2765ms for 1000 objects.14:31:49,859 INFO [STDOUT] Internal ValueObject creation took 719ms for 1000 objects.14:31:49,859 INFO [STDOUT] Secondary Retrival, beans are in cache.14:31:50,125 INFO [STDOUT] finder took 266ms.14:31:52,765 INFO [STDOUT] External ValueObject creation took 2640ms for 1000 objects.14:31:53,437 INFO [STDOUT] Internal ValueObject creation took 672ms for 1000 objects. These results also beg the question of why the interceptor stack takes so long to transversion, hense the extra 2000ms for 1000s ejbs, but lets leave that for a seperate thread. .pet
[JBoss-user] CMRs are Slow (was: Entity Bean Performance Tuning Help)
The "Entity Bean Performance Tuning Help" thread went off in various different directions. The thread begged a sample and a little more detail as to what was slow. I've identified the problem to be (CMRs) and provided a full sample (attached). Lets rehash what i'm testing: The code runs inside of a SSB with a transaction on each method vs servlet (struts action) + manual transaction as in the real app. I use hypersonic vs oracle in my real app. calls findAll() dumps out the time iterates through each calling all methods and building a valueobject. this should cache all results (checkout my jboss.xml) iterates through each calling all methods and building a valueobject (a 2nd time) dumps out the time iterates through each and calling 1 method on ejb, which builds the valueobject internally dumps out the time I'm mostly concerned with the last time, as it's what i do in my real case...because it's the fastest. The entitybean has 2 CMRs. The read-all+fields time for 1000 cached beans using internal valueobject generation takes about 670ms. But with 1 cmr it only takes 350ms. And with No cmrs it only takes 150ms. [if you want slightly modified code, let me know]. Now 150ms is great! But 350 isn't. It's more then double. Is this acceptable? Add a few more and it's unusable for a lot of applications. Arguably cmp EntityBeans were worthless till ejb2.0 and CMRs came along. But to actually use them in JBoss is suicide for performance. The attached sample has a test class called "Test", which can be run with -c to generate 1000 test rows. Also included is an ant script which builds the test beans and deploys them to jboss, if you set your jboss.install path in build.properties. Here the actual output from my last test run: 14:31:36,312 INFO [STDOUT] creating 1000 Blobs...14:31:43,968 INFO [STDOUT] Creation complete, took 7656ms.14:31:46,328 INFO [STDOUT] testing retrival speed...14:31:46,328 INFO [STDOUT] Initial Retrival, beans may or maynot be in cache.14:31:46,375 INFO [STDOUT] finder took 47ms.14:31:49,140 INFO [STDOUT] External ValueObject creation took 2765ms for 1000 objects.14:31:49,859 INFO [STDOUT] Internal ValueObject creation took 719ms for 1000 objects.14:31:49,859 INFO [STDOUT] Secondary Retrival, beans are in cache.14:31:50,125 INFO [STDOUT] finder took 266ms.14:31:52,765 INFO [STDOUT] External ValueObject creation took 2640ms for 1000 objects.14:31:53,437 INFO [STDOUT] Internal ValueObject creation took 672ms for 1000 objects. These results also beg the question of why the interceptor stack takes so long to transversion, hense the extra 2000ms for 1000s ejbs, but lets leave that for a seperate thread. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. entitybean-withcmr-perf-test.zip Description: Binary data
RE: [JBoss-user] Entity Bean Performance Tuning Help
Nope it's defiantly cached. The first time it takes almost 12,000ms to build the beans. Yes that is 10 times slower...course it does have to initiate the db connections, and the db isn't very fast. .peter -Original Message- From: Dain Sundstrom [mailto:dain@;daingroup.com] Sent: Monday, November 04, 2002 7:09 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help Luttrell, Peter wrote: > It is faster. I tried it in response to danch's message early in the thread. > > Thus I have the same question (which no one commented on): "Time ~1200ms is > a lot better then the original 2200, but can this still be acceptable for > reading ~10 fields from 750ejbs that are 100% cached?" > > Here is the email in this thread reporting the results: I think you will get the same answer, run a profiler and find out what is taking the 1200 ms. It should be obvious. If you can't fix whatever is taking all the time, come back and complain about "x" being really slow. My guess is the data isn't cached and it is taking 1199 ms to get it from the database and 1 ms to build the value object. -dain --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by: See the NEW Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Entity Bean Performance Tuning Help
It is faster. I tried it in response to danch's message early in the thread. Thus I have the same question (which no one commented on): "Time ~1200ms is a lot better then the original 2200, but can this still be acceptable for reading ~10 fields from 750ejbs that are 100% cached?" Here is the email in this thread reporting the results: >That makes sense for the weird timing observations. > >I tried the value object pattern with a local ejbHome method. Utilizing a >finder this reduced my time from ~2200ms to ~1600, then i tried an ejbSelect >which took it down to ~1400ms. > >Then i tried your suggestion (bulk getter) and was able to get the time to >about ~1200ms. A lot better then the original 2200, but can this still be >acceptable for reading ~10 fields from 750ejbs that are 100% cached? > >Also, the first time though (uncached), is still very long >11,000 ms for >the exact same code and data...course a bit of this is creating db pool >connections. > >.peter -Original Message- From: Dain Sundstrom [mailto:dain@;daingroup.com] Sent: Monday, November 04, 2002 5:10 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help Luttrell, Peter wrote: > Bill also suggested that it was my code, which i don't think is the case. I > could be wrong ~ can anyone suggest how i can optimize this constructor: > > public MyValueObject(SomeLocalInterface ejb){ > > name = ejb.getName(); > id = ejb.getId(); > someOtherField = ejb.getSomeOtherField(); > } > > There are about 10 fields or so. I did double check and realize that one of > them is a field on a relationship, which may be the source of the problem. You are doing 10 invocations through the ejb layers. The code will be way more efficient if you put the value object creation code inside the entity bean. For example public abstract class MyEntityBean extends EJBObject { public MyValueObject getValueObject() { MyValueObject valueObject = new MyValueObject(); valueObject.setName(getName()); valueObject.setId(getId()); valueObject.setSomeOtherField(getSomeOtherField()); } } The important difference is the loading of the value object gets all of the data from the ejb using calls inside of the bean instance and specifically the calls don't travel over a Remote or Local interface. This means there is no code interpositioned. -dain --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] User Monitoring
My sysadmin has one large grip with JBoss: There is no way to tell who is using a webapp at a particular time, which he claims is possible with Weblogic. I'm using Jetty, if i turn on the metrics, i can ascertain how many sessions are active (not timed out). Does anyone know how i can figure out what the userPrincipal is for the httpsessions? Or does anyone have any other ideas on how to monitor Who is using Jboss? Other then the obvious one, which is write a bunch of custom code that updates some custom monitor through filters or interceptors or manually? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] Entity Bean Performance Tuning Help
Thanks for the advice. I'll checkout SwiftMQ. .peter -Original Message- From: Georg Schmid [mailto:georg-schmid@;ti.com] Sent: Tuesday, October 29, 2002 11:28 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Entity Bean Performance Tuning Help Peter, it's a great relief to see, that I am not the only one... I have not given up hope yet, but I cannot crank out enough hours to get to the core of the problem. In the app I did before the current one, I used the paging and web layer caching approach you suggest, albeit on a small scale. Then I embraced EJB and CMP2.0. Despite my current problems I am still convinced that it was the right decision. I find it more convenient to put my tables inside a using the overflow:auto css style, so I can simply scroll down the complete list without paging. I am using the JSTL to do the presentation layer. Actually I had JBoss running under OptimizeIt two weeks ago, but then I was distracted and now my evaluation license expired. May be you try to use SwiftMQ (they used to have docs on how to integrate with Jboss on their website). My company did a performance comparison against IBM MQ Series, and SwiftMQ was significantly faster (lean and mean, so to say, but no work flow component etc.). Regards Georg -Original Message- From: [EMAIL PROTECTED] [mailto:jboss-user-admin@;lists.sourceforge.net] On Behalf Of Luttrell, Peter Sent: Tuesday, October 29, 2002 17:39 To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] Entity Bean Performance Tuning Help Georg, I used 2 other non-ejb solutions to get what I needed done. Cache the dataobjects in the webtier. It will only work in certain cases, 2/3 in my case. I know it's duplicating work that the ejb container should do, but if there is noting that can be done to JBoss to get performance acceptable then... Paginate the results. Checkout this taglib, it does it all for you automatically: http://edhill.its.uiowa.edu/display/. Plus my users like it better because IE can render the pages very fast, compared to the super long time it takes with large tables. .peter -Original Message- From: Georg Schmid [mailto:georg-schmid@;ti.com] Sent: Tuesday, October 29, 2002 2:23 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Entity Bean Performance Tuning Help First of all: This was only an experiment to check the impact of the EntitySynchronizationInterceptor on performance. Of course this is nothing you should do in a real setup. I know what the EntitySynchronizationInterceptor is for. I have been using JBoss for almost a year, reading almost all posts on the Jboss dev, user and cvs mailing lists, as well as searching the forums regulary, if I have an issue to solve. My problem is: Creating value objects through calling a method on an CMP2.0 entity bean takes 3 to 10 times more time than walking through an equivalent result set of a 'raw' JDBC query. I tried to dig into this issue by stripping down the interceptor stack !as an experiment! to the bare minimum. The result of this experiment was, that the EntitySynchronizationInterceptor is the only interceptor, that changes performance significantly in my setup. Removing the transaction or security interceptors did not have any significant impact. Getting the data from the database into the Jboss server memory is not the problem. The finder I am using for testing returns a result set with 1000 rows. It uses the default load group. This means that all data is in memory after the finder has completed, which takes only a few hundred milliseconds, just like issuing a "select * from BeanTable". For this reason playing around with page sizes and load groups etc. is pointless. My experience is that locking has no measurable effect on the performance (the performance test is strictly single-user). The time is lost when I walk through the collection of entity beans returned by the finder and call a method on each to create the value objects (one method call per value object). Others have come to the same conclusion, but I have not found a post that points to a solution of this problem. I really would like to be able to do a web page, that displays at most about 4000 rows, using entity beans and CMP2.0. But with the current performance I have to switch to direct JDBC calls in my stateless session beans every time I have to display more than 500 rows (Jboss 3.0.3 running on a dual UltraSparcIII with 4GB memory and an Oracle db on similar hardware). This is the issue I am trying to solve. If you could help me with that I'd really appreciate it. Thanks. Regards Georg -Original Message- From: [EMAIL PROTECTED] [mailto:jboss-user-admin@;lists.sourceforge.net] On Behalf Of Bill Burke Sent: Tuesday, October 29, 2002 07:24 To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Entity Bean Performance Tuning Help Georg stop spewing nonsenseNever ever take out the synchronization interceptor!
RE: [JBoss-user] Entity Bean Performance Tuning Help
I was using read-ahead, as it's on by default. See original posting. -Original Message- From: Emerson Cargnin - SICREDI Serviços [mailto:emersonc@;sicredi.com.br] Sent: Tuesday, October 29, 2002 1:35 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help i think that maybe using a read-ahead configuration for cmr could turn CMP usable, hence the cause of the slowness (IMHO) is the great number of selects as you navigate through each BEAN. Jason Westra wrote: > Dain wrote: > >>>I disagree with you here. It depends on the type of reads you are >>>doing. A lot of applications increase performance by offloading >>>processing to the database with very complex queries and stored >>>procedures, and the current CMP design can not benefit from this design. >> > This was my point. Sounds like you agree. :) The current CMP design has > problems with large, complex reads. You can't effectivly use CMP for > everything, nor was the EJB spec's CMP section able solve ALL data query > problems. > > J > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:jboss-user-admin@;lists.sourceforge.net]On Behalf Of Dain > Sundstrom > Sent: Tuesday, October 29, 2002 11:43 AM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help > > > Jason Westra wrote: > >>Hi JBoss friends, >> >>I tend to agree with Bill and Dain's last posting here. There are certain >>things that CMP is not designed to do *well* and large, heavy reads is one >>of them. > > > I disagree with you here. It depends on the type of reads you are > doing. A lot of applications increase performance by offloading > processing to the database with very complex queries and stored > procedures, and the current CMP design can not benefit from this design. > The JBoss 4.0 design will be able to benefit from hand tuned queries. > > >>I'd venture to guess the same performance problem will occur on other app >>servers, in which case, it is not a war of servers, but a principle of >>application design (SSB+JDBC vs. CMP). If the numbers come in much better >>from testing on other app servers, we need to get JBoss "fixed". Until > > then, > >>I'd recommend a different approach than CMP. > > > My goal for the 4.0 architecture is to enable the easy use of a hybrid > approach to CMP. In this design you can use CMP for the 98% of you app > that performs well under the current code and for the 2% that needs hand > code you can plug in a custom interceptor to tune queries. > > -dain > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > --- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > -- | Emerson Cargnin | | Analista de Sistemas Sr. | | Tel : (051) 3358-4959| | SICREDI Serviços | | Porto Alegre - Brasil| |xx| --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the AS
RE: [JBoss-user] Entity Bean Performance Tuning Help
Bills suggestion was that the dataobject creation was the problem. Which i would agree with based on the trace i had put in. Bill also suggested that it was my code, which i don't think is the case. I could be wrong ~ can anyone suggest how i can optimize this constructor: public MyValueObject(SomeLocalInterface ejb){ name = ejb.getName(); id = ejb.getId(); someOtherField = ejb.getSomeOtherField(); } There are about 10 fields or so. I did double check and realize that one of them is a field on a relationship, which may be the source of the problem. I'll see if i have time this week for a quick sample. Last week was deployment week. .peter -Original Message- From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] Sent: Wednesday, October 30, 2002 3:14 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] Entity Bean Performance Tuning Help Georg, > It seems that my (and, at least to some degree, Peter's) specific > problem is misunderstood. > ... > into a collection of value objects. None of the previous posts (except > Peter's) touches upon this subject. That's wrong: Bill suggested something wrt to your value object and I suggested that you provide a small test case on which we could work. cheers, Sacha P.S.: BTW, is your "for" loop running in a single transaction? What is the transaction attribute of the code running in the for loop? --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This SF.net email is sponsored by: ApacheCon, November 18-21 in Las Vegas (supported by COMDEX), the only Apache event to be fully supported by the ASF. http://www.apachecon.com ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] Entity Bean Performance Tuning Help
ctor of > 2, if no or only one attribute is read, but makes it worse, if many > attributes have to be read. > > BTW: I used commit option B, read-ahead on-load, and the Instance Per > Transaction setup in my experiments. > > The pattern you found is interesting. Because there are so many things > impacting the performance, it is hard to tell, whom to ask (Dain, > Bill, David,...). > > Bill Burke did some performance tests using ECPerf. Maybe he can > report a bit on the results. > > Regards > Georg > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:jboss-user-admin@;lists.sourceforge.net] On Behalf Of Luttrell, > Peter > Sent: Saturday, October 19, 2002 02:17 > To: '[EMAIL PROTECTED]' > Subject: [JBoss-user] Entity Bean Performance Tuning Help > > > I have something that is taking longer then I would like and am trying > to tune jboss to reduce the time it takes. > > My test scenario is as such: > > JBoss3.0.3 on jdk1.4.1_01 > 1 2.0 CMP Enity bean with about 10 fields and 3 relationships. I'm > using commit-option A so all beans should be cached (see cache policy > below) once loaded. The first time that I run this it obviously takes > longer (filling the cache), however subsequent times aren't as fast as > i would like; see > below: > > I have a method, which does this: > > 1) begin manual transaction with jta > > 2) calls findBySomeCriteria() which returns some 750 ejbs > ->takes 200-300ms (good) > > 3) then iterate through each, calling one of the methods > i do this to fill the readahead cache for all the beans in an > attempt to isolate the performance problem > ->takes 80-100ms (good) > > 4) then iterate through each, and constructing a dataobject that I > use for display purposes > ->takes 2000-2500ms (this seams way too long) > > 5) commit the transaction, blablabla.. > > The problem is step 4 seams to be taking longer then it should. > > I then added some trace to the dataobject constructor method, where I > basically pass in a reference to the ejb and call most of the methods > on it. The trace dumps out the total time the constructor took. I > noticed a weird pattern. Most of the constructions took 0ms, but every > 5th or so it took 15-16ms, which is where all of my time is going. > Note that it is not exactly every 5th and tends to vary a bit. Here's > a sample of the > output: > > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 16 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 16 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 16 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,949 INFO [STDOUT] displayBean construction too
RE: [JBoss-user] Entity Bean Performance Tuning Help
Because there are so many things > impacting the performance, it is hard to tell, whom to ask (Dain, > Bill, David,...). > > Bill Burke did some performance tests using ECPerf. Maybe he can > report a bit on the results. > > Regards > Georg > > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:jboss-user-admin@;lists.sourceforge.net] On Behalf Of Luttrell, > Peter > Sent: Saturday, October 19, 2002 02:17 > To: '[EMAIL PROTECTED]' > Subject: [JBoss-user] Entity Bean Performance Tuning Help > > > I have something that is taking longer then I would like and am trying > to tune jboss to reduce the time it takes. > > My test scenario is as such: > > JBoss3.0.3 on jdk1.4.1_01 > 1 2.0 CMP Enity bean with about 10 fields and 3 relationships. I'm > using commit-option A so all beans should be cached (see cache policy > below) once loaded. The first time that I run this it obviously takes > longer (filling the cache), however subsequent times aren't as fast as > i would like; see > below: > > I have a method, which does this: > > 1) begin manual transaction with jta > > 2) calls findBySomeCriteria() which returns some 750 ejbs > ->takes 200-300ms (good) > > 3) then iterate through each, calling one of the methods > i do this to fill the readahead cache for all the beans in an > attempt to isolate the performance problem > ->takes 80-100ms (good) > > 4) then iterate through each, and constructing a dataobject that I > use for display purposes > ->takes 2000-2500ms (this seams way too long) > > 5) commit the transaction, blablabla.. > > The problem is step 4 seams to be taking longer then it should. > > I then added some trace to the dataobject constructor method, where I > basically pass in a reference to the ejb and call most of the methods > on it. The trace dumps out the total time the constructor took. I > noticed a weird pattern. Most of the constructions took 0ms, but every > 5th or so it took 15-16ms, which is where all of my time is going. > Note that it is not exactly every 5th and tends to vary a bit. Here's > a sample of the > output: > > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 16 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 16 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 16 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,949 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,949 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms >
RE: [JBoss-user] Entity Bean Performance Tuning Help
That makes sense for the weird timing observations. I tried the value object pattern with a local ejbHome method. Utilizing a finder this reduced my time from ~2200ms to ~1600, then i tried an ejbSelect which took it down to ~1400ms. Then i tried your suggestion (bulk getter) and was able to get the time to about ~1200ms. A lot better then the original 2200, but can this still be acceptable for reading ~10 fields from 750ejbs that are 100% cached? Also, the first time though (uncached), is still very long >11,000 ms for the exact same code and data...course a bit of this is creating db pool connections. .peter -Original Message- From: Dan Christopherson [mailto:danch@;nvisia.com] Sent: Monday, October 21, 2002 12:45 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] Entity Bean Performance Tuning Help Luttrell, Peter wrote: > basically pass in a reference to the ejb and call most of the methods on it. > The trace dumps out the total time the constructor took. I noticed a weird > pattern. Most of the constructions took 0ms, but every 5th or so it took > 15-16ms, which is where all of my time is going. Note that it is not exactly > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 15 ms > 18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms Assuming you're using System.currentTimeMillis(), this might just be the granularity that this method uses: in the past, I've noticed it returning only multiples of 10 under windows. One thing that this method is doing is it's calling through the entire container stack for each attribute that needs to be copied to the data object. Can you instead give the entity a factory method (bulk getter)? That might help by reducing overhead. -danch --- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576298;k? http://www.sun.com/javavote ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] JBoss on Solaris?
Has anyone had success running JBoss on Solaris? I just installed jboss3.0.3 and jdk1.4.1_01 on Solaris. Before changing anything but the JAVA_HOME i started and stopped JBoss. When it stops i get a Cannot Connection Socket Exception from the Hypersonic service. This happens repeatedly. Does anyone know why? And better yet how to fix it? thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
[JBoss-user] Solaris Service Script
Does anyone have a script to run JBoss3.x on Solaris? I know it comes with one for redhat, but i'd rather not go through modifing it if someone already has. thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] JBossMQ Perforamance
i shouldn't need to go thereespecially considering one of the boxes in my gigabit tests runs the OSX and i'm not about to install linux for ppcwhat a step backwards! Plus all my users run w2k. -Original Message- From: Alwyn Schoeman [mailto:alwyn@;smart.com.ph] Sent: Thursday, October 24, 2002 9:21 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] JBossMQ Perforamance If you are using linux on both boxes connected directly with crossover-cable you might actually use special kernel functionality for that specific setup. Have not used it myself, but it is there if you want to look... On Thu, Oct 24, 2002 at 10:00:09AM -0500, Luttrell, Peter wrote: > Is there a way to reduce latency between 2 boxes connected with a 4 foot > crossover cable? Seams to me that this should provide the highest throughput > possible > > So are you basically saying that ~1500 messages per second is the fastest > that jbossmq can do? > > Did you see my message about hanging on to the connection which can lead to > >22,000 messages per second? > > .peter > > -Original Message- > From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] > Sent: Thursday, October 24, 2002 2:18 AM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] JBossMQ Perforamance > > > And if your issue was simply because of network latency (if my memory > serves, latency is the same on both type of networks)? > > ~1500 messages/sec => 1 message each 0.5/1ms. What is your actual network > latency? > > Cheers, > > > Sacha > > > -Message d'origine- > > De : [EMAIL PROTECTED] > > [mailto:jboss-user-admin@;lists.sourceforge.net]De la part de Peter > > Luttrell > > Envoye : mardi, 22 octobre 2002 07:41 > > A : [EMAIL PROTECTED] > > Objet : [JBoss-user] JBossMQ Perforamance > > > > > > In order to ascertain if JBossMQ is capable of providing the throughput > > I need, i've constructed a couple of little apps to see what kind of > > performance i can get. Here's what i've found: > > > > 100 Megabit:1250-1350 messages per second > > Gigabit:1500-1600 messages per second > > > > I was hoping to see a bit better performance then this; especially a > > larger differential with Gigabit. 100Megabit only used about 10% of the > > network bandwidth (if you believe xp's network monitor) and gigabit > > only used at most 1.5%. > > > > Is this the best performance i can expect? > > What have others observed? > > > > Can anyone suggest where the bottleneck might be? > > Does anyone have any suggestions on what configs to tweak? > > > > All of my test code, and deployable ear is located at > > http://www.sharpuniverse.com/jboss/jms-performance > > There is a publisher and subscriber swingapps which are webstart > > deployed. There is also a publisher servlet. Deploy the ear and go to > > context: jms-performance-test for everything > > > > Here's a little more info on my tests: > > JBoss3.0.3 > > Protocal/ConnecitonFactory: OIL > > 100MegaBit tests: > > Network: several different networks all switched > > Server/Client boxes: Various differnt boxes runing w2k, > > wxp, osx and > > linux, various different jdks 1.4.0 - 1.4.1_01 > > Gigabit tests: > > Network: 2 boxes with crossover cable > > Server: MacOSX running jdk1.3.1 > > Client: WindowsXP running jdk1.4.1_01 > > > > .peter > > > > > > > > --- > > This sf.net emial is sponsored by: Influence the future of > > Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) > > program now. http://ad.doubleclick.net/clk;4699841;7576301;v? > > http://www.sun.com/javavote > > ___ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > > > --- > This sf.net email is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > This transmission contains information solely for intended recipient and may > be privileged, confidential and/or otherwise protect from disc
RE: [JBoss-user] JBossMQ Perforamance >> Hiram
Hiram? -Original Message- From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] Sent: Thursday, October 24, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBossMQ Perforamance I don't exactly know what is happening under the cover in this case. What I am saying is that if you have a single connection that does this: 1) take a message 2) send it 3) when sent, start again to point 1) Then, independently of the bandwith, you will have a latency limit that cannot be changed, event by using a 1Tb/s link. As an analogy, imagine that what you are trying to achieve is to deliver postal letters to your central office and that: - you have only one guy that can run between the local site and the destination (i.e. one connection) - this guy only deliver one message at a time - it takes 1 hour to go to the destination and come back (i.e. latency) No matter if the car is huge or if the highway is very wide: you will only be able to transport 24 letters per day (if the guy never sleeps). To go over this number, you need to use other scheme such as streaming the messages without waiting for an ACK, etc. Hiram is your guy anyway ;) Cheers, Sacha > -Message d'origine- > De : [EMAIL PROTECTED] > [mailto:jboss-user-admin@;lists.sourceforge.net]De la part de Luttrell, > Peter > Envoyé : jeudi, 24 octobre 2002 17:00 > À : '[EMAIL PROTECTED]' > Objet : RE: [JBoss-user] JBossMQ Perforamance > > > Is there a way to reduce latency between 2 boxes connected with a 4 foot > crossover cable? Seams to me that this should provide the highest > throughput > possible > > So are you basically saying that ~1500 messages per second is the fastest > that jbossmq can do? > > Did you see my message about hanging on to the connection which > can lead to > >22,000 messages per second? > > .peter > > -Original Message- > From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] > Sent: Thursday, October 24, 2002 2:18 AM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] JBossMQ Perforamance > > > And if your issue was simply because of network latency (if my memory > serves, latency is the same on both type of networks)? > > ~1500 messages/sec => 1 message each 0.5/1ms. What is your actual network > latency? > > Cheers, > > > Sacha > > > -Message d'origine- > > De : [EMAIL PROTECTED] > > [mailto:jboss-user-admin@;lists.sourceforge.net]De la part de Peter > > Luttrell > > Envoye : mardi, 22 octobre 2002 07:41 > > A : [EMAIL PROTECTED] > > Objet : [JBoss-user] JBossMQ Perforamance > > > > > > In order to ascertain if JBossMQ is capable of providing the throughput > > I need, i've constructed a couple of little apps to see what kind of > > performance i can get. Here's what i've found: > > > > 100 Megabit:1250-1350 messages per second > > Gigabit:1500-1600 messages per second > > > > I was hoping to see a bit better performance then this; especially a > > larger differential with Gigabit. 100Megabit only used about 10% of the > > network bandwidth (if you believe xp's network monitor) and gigabit > > only used at most 1.5%. > > > > Is this the best performance i can expect? > > What have others observed? > > > > Can anyone suggest where the bottleneck might be? > > Does anyone have any suggestions on what configs to tweak? > > > > All of my test code, and deployable ear is located at > > http://www.sharpuniverse.com/jboss/jms-performance > > There is a publisher and subscriber swingapps which are webstart > > deployed. There is also a publisher servlet. Deploy the ear and go to > > context: jms-performance-test for everything > > > > Here's a little more info on my tests: > > JBoss3.0.3 > > Protocal/ConnecitonFactory: OIL > > 100MegaBit tests: > > Network: several different networks all switched > > Server/Client boxes: Various differnt boxes runing w2k, > > wxp, osx and > > linux, various different jdks 1.4.0 - 1.4.1_01 > > Gigabit tests: > > Network: 2 boxes with crossover cable > > Server: MacOSX running jdk1.3.1 > > Client: WindowsXP running jdk1.4.1_01 > > > > .peter > > > > > > > > --- > > This sf.net emial is sponsored by: Influence the future of > > Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) > > program now. http://ad.doubleclick.net/clk;4699841;7576301;v? > > http://www.sun.com/javavote >
RE: [JBoss-user] JBossMQ Perforamance
Is there a way to reduce latency between 2 boxes connected with a 4 foot crossover cable? Seams to me that this should provide the highest throughput possible So are you basically saying that ~1500 messages per second is the fastest that jbossmq can do? Did you see my message about hanging on to the connection which can lead to >22,000 messages per second? .peter -Original Message- From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] Sent: Thursday, October 24, 2002 2:18 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBossMQ Perforamance And if your issue was simply because of network latency (if my memory serves, latency is the same on both type of networks)? ~1500 messages/sec => 1 message each 0.5/1ms. What is your actual network latency? Cheers, Sacha > -Message d'origine- > De : [EMAIL PROTECTED] > [mailto:jboss-user-admin@;lists.sourceforge.net]De la part de Peter > Luttrell > Envoye : mardi, 22 octobre 2002 07:41 > A : [EMAIL PROTECTED] > Objet : [JBoss-user] JBossMQ Perforamance > > > In order to ascertain if JBossMQ is capable of providing the throughput > I need, i've constructed a couple of little apps to see what kind of > performance i can get. Here's what i've found: > > 100 Megabit: 1250-1350 messages per second > Gigabit: 1500-1600 messages per second > > I was hoping to see a bit better performance then this; especially a > larger differential with Gigabit. 100Megabit only used about 10% of the > network bandwidth (if you believe xp's network monitor) and gigabit > only used at most 1.5%. > > Is this the best performance i can expect? > What have others observed? > > Can anyone suggest where the bottleneck might be? > Does anyone have any suggestions on what configs to tweak? > > All of my test code, and deployable ear is located at > http://www.sharpuniverse.com/jboss/jms-performance > There is a publisher and subscriber swingapps which are webstart > deployed. There is also a publisher servlet. Deploy the ear and go to > context: jms-performance-test for everything > > Here's a little more info on my tests: > JBoss3.0.3 > Protocal/ConnecitonFactory: OIL > 100MegaBit tests: > Network: several different networks all switched > Server/Client boxes: Various differnt boxes runing w2k, > wxp, osx and > linux, various different jdks 1.4.0 - 1.4.1_01 > Gigabit tests: > Network: 2 boxes with crossover cable > Server: MacOSX running jdk1.3.1 > Client: WindowsXP running jdk1.4.1_01 > > .peter > > > > --- > This sf.net emial is sponsored by: Influence the future of > Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) > program now. http://ad.doubleclick.net/clk;4699841;7576301;v? > http://www.sun.com/javavote > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4729346;7592162;s?http://www.sun.com/javavote ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
RE: [JBoss-user] JBossMQ Perforamance
I understand what you're saying. Threading should solve this problem. Send 10 cars down your 10 car highway. I guess I would have thought that JbossMQ would already be threaded. Am I wrong? .peter -Original Message- From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] Sent: Thursday, October 24, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBossMQ Perforamance I don't exactly know what is happening under the cover in this case. What I am saying is that if you have a single connection that does this: 1) take a message 2) send it 3) when sent, start again to point 1) Then, independently of the bandwith, you will have a latency limit that cannot be changed, event by using a 1Tb/s link. As an analogy, imagine that what you are trying to achieve is to deliver postal letters to your central office and that: - you have only one guy that can run between the local site and the destination (i.e. one connection) - this guy only deliver one message at a time - it takes 1 hour to go to the destination and come back (i.e. latency) No matter if the car is huge or if the highway is very wide: you will only be able to transport 24 letters per day (if the guy never sleeps). To go over this number, you need to use other scheme such as streaming the messages without waiting for an ACK, etc. Hiram is your guy anyway ;) Cheers, Sacha > -Message d'origine- > De : [EMAIL PROTECTED] > [mailto:jboss-user-admin@;lists.sourceforge.net]De la part de Luttrell, > Peter > Envoyé : jeudi, 24 octobre 2002 17:00 > À : '[EMAIL PROTECTED]' > Objet : RE: [JBoss-user] JBossMQ Perforamance > > > Is there a way to reduce latency between 2 boxes connected with a 4 foot > crossover cable? Seams to me that this should provide the highest > throughput > possible > > So are you basically saying that ~1500 messages per second is the fastest > that jbossmq can do? > > Did you see my message about hanging on to the connection which > can lead to > >22,000 messages per second? > > .peter > > -Original Message- > From: Sacha Labourey [mailto:Sacha.Labourey@;ml.cogito-info.ch] > Sent: Thursday, October 24, 2002 2:18 AM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] JBossMQ Perforamance > > > And if your issue was simply because of network latency (if my memory > serves, latency is the same on both type of networks)? > > ~1500 messages/sec => 1 message each 0.5/1ms. What is your actual network > latency? > > Cheers, > > > Sacha > > > -Message d'origine- > > De : [EMAIL PROTECTED] > > [mailto:jboss-user-admin@;lists.sourceforge.net]De la part de Peter > > Luttrell > > Envoye : mardi, 22 octobre 2002 07:41 > > A : [EMAIL PROTECTED] > > Objet : [JBoss-user] JBossMQ Perforamance > > > > > > In order to ascertain if JBossMQ is capable of providing the throughput > > I need, i've constructed a couple of little apps to see what kind of > > performance i can get. Here's what i've found: > > > > 100 Megabit:1250-1350 messages per second > > Gigabit:1500-1600 messages per second > > > > I was hoping to see a bit better performance then this; especially a > > larger differential with Gigabit. 100Megabit only used about 10% of the > > network bandwidth (if you believe xp's network monitor) and gigabit > > only used at most 1.5%. > > > > Is this the best performance i can expect? > > What have others observed? > > > > Can anyone suggest where the bottleneck might be? > > Does anyone have any suggestions on what configs to tweak? > > > > All of my test code, and deployable ear is located at > > http://www.sharpuniverse.com/jboss/jms-performance > > There is a publisher and subscriber swingapps which are webstart > > deployed. There is also a publisher servlet. Deploy the ear and go to > > context: jms-performance-test for everything > > > > Here's a little more info on my tests: > > JBoss3.0.3 > > Protocal/ConnecitonFactory: OIL > > 100MegaBit tests: > > Network: several different networks all switched > > Server/Client boxes: Various differnt boxes runing w2k, > > wxp, osx and > > linux, various different jdks 1.4.0 - 1.4.1_01 > > Gigabit tests: > > Network: 2 boxes with crossover cable > > Server: MacOSX running jdk1.3.1 > > Client: WindowsXP running jdk1.4.1_01 > > > > .peter > > > > > > > > --- > > This sf.net emial is sponsored by: Influence the future of
RE: [JBoss-user] JBossMQ Perforamance
that would explain the network utilization as all messages i'm working with are really small. with a very similar size 'message' i tried 2 additional tests with raw sockets. it's been a while since i've done work with sockets directly...so it's quite possible the much could be done to improve this test...also these little classes are single threaded and synchronous. attached is the code. here are the results: creating a new socket for each message: <850 messages per second reusing the same socket: >22,000 messages per second Is OIL holding on to the connections? If not, why not? .peter -Original Message- From: Rupp,Heiko [mailto:heiko.rupp@;bancotec.de] Sent: Tuesday, October 22, 2002 8:30 AM To: '[EMAIL PROTECTED]' Subject: RE: [JBoss-user] JBossMQ Perforamance > You should however have some difficulty filling up gigabit > ethernet from Packets per second is one thing. The other is packet size. With small packets, a network adapter or switch can be at its limit even if the network if not filled. On the other hand with large packets a network can fill up even if the throughput in pps is not at its maximum point. --- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. socket-test.zip Description: Binary data
RE: [JBoss-user] JBossMQ Perforamance
Yes, i directly changed the class and hense tied it to the original OILs jndi name. Course in my case its ok as the only thing that is deployed on the instance is my performance test apps. But i quickly changed it back... -Original Message- From: Alwyn Schoeman [mailto:alwyn@;smart.com.ph] Sent: Tuesday, October 22, 2002 7:36 PM To: '[EMAIL PROTECTED]' Subject: Re: [JBoss-user] JBossMQ Perforamance Will this change mean that any programs will still continue to use "ConnectionFactory" in the JNDI lookup, but will get new OIL2 factory? >From which version is OIL2 supported? On Tue, Oct 22, 2002 at 11:26:54AM -0500, Luttrell, Peter wrote: > > I assume that all I need to change is from this: > > name="jboss.mq:service=InvocationLayer,type=OIL"> > optional-attribute-name="Invoker">jboss.mq:service=Invoker > ConnectionFactory > name="XAConnectionFactoryJNDIRef">XAConnectionFactory > 8090 > 6 > true > > > > to this: > > name="jboss.mq:service=InvocationLayer,type=OIL"> > optional-attribute-name="Invoker">jboss.mq:service=Invoker > ConnectionFactory > name="XAConnectionFactoryJNDIRef">XAConnectionFactory > 8090 > 6 > true > > > > If this is correct the results aren't so great, in fact its slower then the > original OIL. > > Just did a couple of tests at work (somewhat of a congested network): > > OIL1: 1000-1050 messages per second > OIL2: 550-600 messages per second > > .peter > > > > -Original Message- > From: Corby Page [mailto:CorbyPage@;duke-energy.com] > Sent: Tuesday, October 22, 2002 10:22 AM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] JBossMQ Perforamance > > > Peter, > > The new OIL2 Invocation layer is supposed to contain significant > performance enhancements. Plug in org.jboss.mq.il.oil2.OIL2ServerILService > as your new Invocation Layer and let us know the new results. > > Thanks, > Corby > > > > --- > This sf.net emial is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > This transmission contains information solely for intended recipient and may > be privileged, confidential and/or otherwise protect from disclosure. If > you are not the intended recipient, please contact the sender and delete all > copies of this transmission. This message and/or the materials contained > herein are not an offer to sell, or a solicitation of an offer to buy, any > securities or other instruments. The information has been obtained or > derived from sources believed by us to be reliable, but we do not represent > that it is accurate or complete. Any opinions or estimates contained in > this information constitute our judgment as of this date and are subject to > change without notice. Any information you share with us will be used in > the operation of our business, and we do not request and do not want any > material, nonpublic information. Absent an express prior written agreement, > we are not agreeing to treat any information confidentially and will use any > and all information and reserve the right to publish or disclose any > information you share with us. > > > --- > This sf.net emial is sponsored by: Influence the future > of Java(TM) technology. Join the Java Community > Process(SM) (JCP(SM)) program now. > http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote > ___ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user -- Alwyn Schoeman SMART Money Inc. "The clock on the wall keeps moving, time stands still... No matter how the dice may fall, someone else always gets to call the number..." This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained
RE: [JBoss-user] JBossMQ Perforamance
I assume that all I need to change is from this: jboss.mq:service=Invoker ConnectionFactory XAConnectionFactory 8090 6 true to this: jboss.mq:service=Invoker ConnectionFactory XAConnectionFactory 8090 6 true If this is correct the results aren't so great, in fact its slower then the original OIL. Just did a couple of tests at work (somewhat of a congested network): OIL1: 1000-1050 messages per second OIL2: 550-600 messages per second .peter -Original Message- From: Corby Page [mailto:CorbyPage@;duke-energy.com] Sent: Tuesday, October 22, 2002 10:22 AM To: [EMAIL PROTECTED] Subject: RE: [JBoss-user] JBossMQ Perforamance Peter, The new OIL2 Invocation layer is supposed to contain significant performance enhancements. Plug in org.jboss.mq.il.oil2.OIL2ServerILService as your new Invocation Layer and let us know the new results. Thanks, Corby --- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net emial is sponsored by: Influence the future of Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) program now. http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Entity Bean Performance Tuning Help
I have something that is taking longer then I would like and am trying to tune jboss to reduce the time it takes. My test scenario is as such: JBoss3.0.3 on jdk1.4.1_01 1 2.0 CMP Enity bean with about 10 fields and 3 relationships. I'm using commit-option A so all beans should be cached (see cache policy below) once loaded. The first time that I run this it obviously takes longer (filling the cache), however subsequent times aren't as fast as i would like; see below: I have a method, which does this: 1) begin manual transaction with jta 2) calls findBySomeCriteria() which returns some 750 ejbs ->takes 200-300ms (good) 3) then iterate through each, calling one of the methods i do this to fill the readahead cache for all the beans in an attempt to isolate the performance problem ->takes 80-100ms (good) 4) then iterate through each, and constructing a dataobject that I use for display purposes ->takes 2000-2500ms (this seams way too long) 5) commit the transaction, blablabla.. The problem is step 4 seams to be taking longer then it should. I then added some trace to the dataobject constructor method, where I basically pass in a reference to the ejb and call most of the methods on it. The trace dumps out the total time the constructor took. I noticed a weird pattern. Most of the constructions took 0ms, but every 5th or so it took 15-16ms, which is where all of my time is going. Note that it is not exactly every 5th and tends to vary a bit. Here's a sample of the output: 18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms18:46:06,840 INFO [STDOUT] displayBean construction took 0 ms18:46:06,855 INFO [STDOUT] displayBean construction took 15 ms18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms18:46:06,855 INFO [STDOUT] displayBean construction took 0 ms18:46:06,871 INFO [STDOUT] displayBean construction took 16 ms18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms18:46:06,871 INFO [STDOUT] displayBean construction took 0 ms18:46:06,886 INFO [STDOUT] displayBean construction took 15 ms18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms18:46:06,886 INFO [STDOUT] displayBean construction took 0 ms18:46:06,902 INFO [STDOUT] displayBean construction took 16 ms18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms18:46:06,902 INFO [STDOUT] displayBean construction took 0 ms18:46:06,918 INFO [STDOUT] displayBean construction took 16 ms18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms18:46:06,918 INFO [STDOUT] displayBean construction took 0 ms18:46:06,933 INFO [STDOUT] displayBean construction took 15 ms18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms18:46:06,933 INFO [STDOUT] displayBean construction took 0 ms18:46:06,949 INFO [STDOUT] displayBean construction took 0 ms18:46:06,949 INFO [STDOUT] displayBean construction took 0 ms18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms18:46:06,965 INFO [STDOUT] displayBean construction took 0 ms18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms18:46:06,980 INFO [STDOUT] displayBean construction took 0 ms18:46:06,996 INFO [STDOUT] displayBean construction took 16 ms my ejb-jar.xml file: I have not declared any security-constraints for the bean. I have tried it with transactions on and off (Required/Supports), which effected performance a little but did not correct the delays i'm seeing. my jboss.xml I have the bean tied to a custom container config. Here's the custom config, which i basically copied directly from the standardjboss.xml file. Note the changes to the cache capacity and age, etc. This is intended to keep the beans in the cache. LongLasting Large CMP 2.x EntityBean Ca
[JBoss-user] Can Finder Methods Use Cache?
My app runs on a slow database. To compensate i have a longer-then-normal bean-cache lifetime and use commit option A - thus once they are loaded, they are always in cache. This works great except for finder methods, because they hit the database to select ids based on query parameters. Is there any way for the cmp engine to use the cache for finder methods? I'm thinking that you'd need all records loaded to make it work - is there anyway to tell jboss to do this? Of course this optimization would only be make sense for small tables, which in certain cases is what I have. .peter **PLEASE NOTE: EFFECTIVE SEPTEMBER 2, 2002, OUR NEW MILWAUKEE OFFICE ADDRESS IS 3600 SOUTH LAKE DRIVE, ST. FRANCIS, WI 53235 AND OUR NEW MAIN PHONE NUMBER IS 414.294.7000** This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
[JBoss-user] Oracle Service in EAR deployment?
I would like to totally contain my deployment to 1 ear file. Does anyone know how to include the oracle-service.xml file and drivers.jar in an ear file? I tried putting the oracle-service.xml file into the ear's meta-inf and the drivers.jar as a module.java in the application.xml, but JBoss loads my ejbs before hand, which are dependant on the oracle-service.xml being loaded, thus it blew up. **PLEASE NOTE: EFFECTIVE SEPTEMBER 2, 2002, OUR NEW MILWAUKEE OFFICE ADDRESS IS 3600 SOUTH LAKE DRIVE, ST. FRANCIS, WI 53235 AND OUR NEW MAIN PHONE NUMBER IS 414.294.7000** This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] JBossMQ Died Mysteriously
No I was never able to figure it out. It only happens sporadically though. No one ever responded my messages either. .peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Monday, September 23, 2002 1:46 PM To: [EMAIL PROTECTED] Subject: [JBoss-user] JBossMQ Died Mysteriously Peter, Did you ever figure this out? We let JBOSS sit over the weekend and JBOSS logged the following error, many times: 2002-09-20 23:58:33,660 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 45 Our application would not respond until we redeployed our .war file. Any assitance would be appreciated. Thanks -doug Douglas E. LaVelle [EMAIL PROTECTED] **PLEASE NOTE: EFFECTIVE SEPTEMBER 2, 2002, OUR NEW MILWAUKEE OFFICE ADDRESS IS 3600 SOUTH LAKE DRIVE, ST. FRANCIS, WI 53235 AND OUR NEW MAIN PHONE NUMBER IS 414.294.7000** This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
[JBoss-user] Jetty Integration
I just switched from using Tomcat to Jetty with all work (JBoss3.0.2 on w2k). I have noticed that hot deployments no longer work of webapps! Here's the error that I get: HTTP ERROR: 500 jzentry == 0, jzfile = 199988168, total = 56, name = C:\Documents and Settings\\Local Settings\Temp\Jetty__8080___\webapp\WEB-INF\lib\.jar, i = 45, message = invalid LOC header (bad signature) RequestURI=/request-authorization.jsp;jsessionid=h3pa6843hiot1 It appears that Jetty or maybe the Deployer is reusing the same directory in the temp dir and windows is not letting it delete the file. When i first noticed this problem my temp dir had like 20,000 files in it. Thus i'd assume that Tomcat used a different directory for each deployment. This seams like a much better approach then reusing the same dir, considering the problem with windows and deleting an inuse file. To solve this, I have tried deleting my ear instead of replacing it, but this didn't seam to help, as undeployments do not result in the temp directory getting cleaned up, or the app server releasing the lock on the file. I'm a bit of a hyper-deployer - I used to be able to run jboss for days straight in development. In the last day i've restarted about 40-50 times... Is this a bug that needs to be fixed? Or is there a confiruration change that I need to make? Any ideas? thanks. .peter **PLEASE NOTE: EFFECTIVE SEPTEMBER 2, 2002, OUR NEW MILWAUKEE OFFICE ADDRESS IS 3600 SOUTH LAKE DRIVE, ST. FRANCIS, WI 53235 AND OUR NEW MAIN PHONE NUMBER IS 414.294.7000** This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
[JBoss-user] JBoss 3.0.1 + Tomcat Release?
Is there going to be a JBoss3.0.1 + Tomcat build posted to sourceforge and jboss.org? In the past the tomcat integration builds have been posted about a day after the jetty releases, but not in this case. Does this represent a change in direction for tomcat releases? There is another thread on this, but it's diverged from the original question which no one answered. I do know that I can manually integrate it (instructions were on the other thread). thanks. .peter **PLEASE NOTE: EFFECTIVE SEPTEMBER 2, 2002, OUR NEW ADDRESS WILL BE 3600 SOUTH LAKE DRIVE, ST. FRANCIS, WI 53235 AND OUR NEW MAIN PHONE NUMBER WILL BE 414.294.7000** This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: Re[2]: [JBoss-user] JBossCMP Change Column Names in CMR
I found the solution to my problem, so i thought i'd post it in case anyone else runs into the same problem. In the jbosscmp-jdbc.xml file, for the field-name fields, instead of the cmr fields that i was specifying, you need to specify the primarykey fields for the related beans. Thus this: User-Roles User_Role Role-Belongs-To-User roles role_name User-has-multiple-Roles users user_name Becomes this: User-Roles User_Role Role-Belongs-To-User name role_name User-has-multiple-Roles userName user_name To figure it out, I used middlegen to reverse engineer my dbschema, at which point i noticed that the field-names weren't what I was doing. .peter -Original Message- From: Alex Loubyansky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 11:13 AM To: Luttrell, Peter Subject: Re[2]: [JBoss-user] JBossCMP Change Column Names in CMR AFAIK, DD's are correct (with my remark). Do you really have in the beans abstract accessors for cmr users and roles? Wednesday, July 31, 2002, 6:47:55 PM, you wrote: LP> I actually tried that and it didn't work either. LP> The only difference is that instead of complaining that it couldn't find LP> "roles", now it complains that it can't find "users". LP> Any other ideas? LP> thanks. LP> .peter LP> -Original Message- LP> From: Alex Loubyansky [mailto:[EMAIL PROTECTED]] LP> Sent: Wednesday, July 31, 2002 1:11 AM LP> To: Peter Luttrell LP> Subject: Re: [JBoss-user] JBossCMP Change Column Names in CMR LP> You need to interchange key-fields for ejb-relationship-role's in LP> jbosscmp-jdbc.xml. LP> I.e. LP> Role-Belongs-To-User> LP> LP> LP> roles LP> role_name LP> LP> LP> ... LP> alex LP> Wednesday, July 31, 2002, 1:45:57 AM, you wrote: PL>> How do you change the column names for a table generated by a LP> MANY-to-MANY PL>> CMR? PL>> Here's an example of what i've tried: PL>> ejb-jar.xml: PL>> PL>> User-Roles PL>> PL>> LP> User-has-multiple-Roles> PL>> Many PL>> PL>> Users PL>> PL>> PL>> roles PL>> java.util.Set PL>> PL>> PL>> PL>> LP> Role-Belongs-To-User> PL>> Many PL>> PL>> Roles PL>> PL>> PL>> users PL>> java.util.Set PL>> PL>> PL>> PL>> My understanding of how to do this is via this entry in LP> jbosscmp-jdbc.xml: PL>> PL>> User-Roles PL>> PL>> User_Role PL>> PL>> PL>> LP> Role-Belongs-To-User> PL>> PL>> PL>> users PL>> user_name PL>> PL>> PL>> PL>> PL>> LP> User-has-multiple-Roles> PL>> PL>> PL>> roles PL>> role_name PL>> PL>> PL>> PL>> PL>> But the problem is that jboss complains ~ It doesn't seam to be able to PL>> locate the "users" or "roles" field-name's that i've declared. Here's LP> the PL>> summary error: PL>> [ObjectName: jboss.j2ee:service=EJB,jndiName=myBEAN PL>> state: FAILED PL>> I Depend On: PL>> Depends On Me: org.jboss.deployment.DeploymentException: CMP field for PL>> key not found: field name=roles, ObjectName: PL>> jboss.j2ee:service=EJB,jnd
RE: Re[2]: [JBoss-user] JBossCMP Change Column Names in CMR
Yep, here's the snipped out of my ejb-jar.xml: User-Roles User-has-multiple-Roles Many Users roles java.util.Set Role-Belongs-To-User Many Roles users java.util.Set Do I need todo something else here to make the other work? It's deployed fine and the code works perfectly. I only run into problems when i added the section in the jbosscmp-jdbc.xml to attempt to change the column-names. thanks. .peter -Original Message- From: Alex Loubyansky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 11:13 AM To: Luttrell, Peter Subject: Re[2]: [JBoss-user] JBossCMP Change Column Names in CMR AFAIK, DD's are correct (with my remark). Do you really have in the beans abstract accessors for cmr users and roles? Wednesday, July 31, 2002, 6:47:55 PM, you wrote: LP> I actually tried that and it didn't work either. LP> The only difference is that instead of complaining that it couldn't find LP> "roles", now it complains that it can't find "users". LP> Any other ideas? LP> thanks. LP> .peter LP> -Original Message- LP> From: Alex Loubyansky [mailto:[EMAIL PROTECTED]] LP> Sent: Wednesday, July 31, 2002 1:11 AM LP> To: Peter Luttrell LP> Subject: Re: [JBoss-user] JBossCMP Change Column Names in CMR LP> You need to interchange key-fields for ejb-relationship-role's in LP> jbosscmp-jdbc.xml. LP> I.e. LP> Role-Belongs-To-User> LP> LP> LP> roles LP> role_name LP> LP> LP> ... LP> alex LP> Wednesday, July 31, 2002, 1:45:57 AM, you wrote: PL>> How do you change the column names for a table generated by a LP> MANY-to-MANY PL>> CMR? PL>> Here's an example of what i've tried: PL>> ejb-jar.xml: PL>> PL>> User-Roles PL>> PL>> LP> User-has-multiple-Roles> PL>> Many PL>> PL>> Users PL>> PL>> PL>> roles PL>> java.util.Set PL>> PL>> PL>> PL>> LP> Role-Belongs-To-User> PL>> Many PL>> PL>> Roles PL>> PL>> PL>> users PL>> java.util.Set PL>> PL>> PL>> PL>> My understanding of how to do this is via this entry in LP> jbosscmp-jdbc.xml: PL>> PL>> User-Roles PL>> PL>> User_Role PL>> PL>> PL>> LP> Role-Belongs-To-User> PL>> PL>> PL>> users PL>> user_name PL>> PL>> PL>> PL>> PL>> LP> User-has-multiple-Roles> PL>> PL>> PL>> roles PL>> role_name PL>> PL>> PL>> PL>> PL>> But the problem is that jboss complains ~ It doesn't seam to be able to PL>> locate the "users" or "roles" field-name's that i've declared. Here's LP> the PL>> summary error: PL>> [ObjectName: jboss.j2ee:service=EJB,jndiName=myBEAN PL>> state: FAILED PL>> I Depend On: PL>> Depends On Me: org.jboss.deployment.DeploymentException: CMP field for PL>> key not found: field name=roles, ObjectName: PL>> jboss.j2ee:service=EJB,jndiName=myBEAN PL>> with the following exception: PL>> 17:34:33,434 WARN [ServiceController] Problem starting service PL>> jboss.j2ee:service=EJB,jndiName=myBEAN PL>> org.jboss.deployment.DeploymentException: CMP field for key not found: PL>> field name=roles PL>> at PL>> LP> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKey LP> Fields(JDBCRe PL>> lationshipRoleMetaData.java:374) PL>> at PL>> LP> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init(JD LP> BCRelationshi PL>> pRol
RE: [JBoss-user] JBossCMP Change Column Names in CMR
I actually tried that and it didn't work either. The only difference is that instead of complaining that it couldn't find "roles", now it complains that it can't find "users". Any other ideas? thanks. .peter -Original Message- From: Alex Loubyansky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 1:11 AM To: Peter Luttrell Subject: Re: [JBoss-user] JBossCMP Change Column Names in CMR You need to interchange key-fields for ejb-relationship-role's in jbosscmp-jdbc.xml. I.e. Role-Belongs-To-User roles role_name ... alex Wednesday, July 31, 2002, 1:45:57 AM, you wrote: PL> How do you change the column names for a table generated by a MANY-to-MANY PL> CMR? PL> Here's an example of what i've tried: PL> ejb-jar.xml: PL> PL> User-Roles PL> PL> User-has-multiple-Roles PL> Many PL> PL> Users PL> PL> PL> roles PL> java.util.Set PL> PL> PL> PL> Role-Belongs-To-User PL> Many PL> PL> Roles PL> PL> PL> users PL> java.util.Set PL> PL> PL> PL> My understanding of how to do this is via this entry in jbosscmp-jdbc.xml: PL> PL> User-Roles PL> PL> User_Role PL> PL> PL> Role-Belongs-To-User PL> PL> PL> users PL> user_name PL> PL> PL> PL> PL> User-has-multiple-Roles PL> PL> PL> roles PL> role_name PL> PL> PL> PL> PL> But the problem is that jboss complains ~ It doesn't seam to be able to PL> locate the "users" or "roles" field-name's that i've declared. Here's the PL> summary error: PL> [ObjectName: jboss.j2ee:service=EJB,jndiName=myBEAN PL> state: FAILED PL> I Depend On: PL> Depends On Me: org.jboss.deployment.DeploymentException: CMP field for PL> key not found: field name=roles, ObjectName: PL> jboss.j2ee:service=EJB,jndiName=myBEAN PL> with the following exception: PL> 17:34:33,434 WARN [ServiceController] Problem starting service PL> jboss.j2ee:service=EJB,jndiName=myBEAN PL> org.jboss.deployment.DeploymentException: CMP field for key not found: PL> field name=roles PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.loadKey Fields(JDBCRe PL> lationshipRoleMetaData.java:374) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationshipRoleMetaData.init(JD BCRelationshi PL> pRoleMetaData.java:157) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCRelationMetaData.(JDBCRela tionMetaData. PL> java:308) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCApplicationMetaData.(JDBCA pplicationMet PL> aData.java:383) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCXmlFileLoader.load(JDBCXmlFileLo ader.java:75) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.loadJDBCEntityMetaData(JDBCS toreManager.j PL> ava:677) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreMa nager.java:38 PL> 9) PL> at PL> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java: 339) PL> at PL> org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java :198) PL> at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376) PL> at org.jboss.ejb.Container.invoke(Container.java:793) PL> at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055) PL> at PL> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) PL> at PL> org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.jav a:950) PL> at $Proxy6.start(Unknown Source) PL> at PL> org.jboss.system.ServiceController.start(ServiceController.java:384) PL> at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source) PL> at PL> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) PL> at java.lang.reflect.Method.invoke(Method.java:324) PL> at PL> org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispat cher.java:284 PL> ) PL> at PL> org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491) PL> at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174) PL> at $Proxy224.start(Unknown Source) PL> at org.jboss.ejb.EjbModule.startService(EjbModule.java:440) PL> at PL> org.jboss.system.Servi
[JBoss-user] What does this error message mean?
This line appeared right before JBoss started puking error messages: 2002-07-24 09:30:21,154 DEBUG [org.jboss.mq.il.oil.OILClientILService]Closing receiver connections on port: 2464 But why would receiver connections be suddenly closed? What is port 2462? I can't seam to find it in any of my config files? Here's some more background on what I'm doing: I let jboss sit for about 20 hours and when i came back it was constantlydumping the following to the console: 2002-07-24 11:00:05,060 WARN [org.jboss.mq.Connection] Connection failure: org.jboss.mq.SpyJMSException: Connection Failed at org.jboss.mq.Connection.asynchFailure(Connection.java:603) at org.jboss.mq.Connection$PingTask.run(Connection.java:1187) atEDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) at java.lang.Thread.run(Thread.java:536)linked exception is:java.io.IOException: ping timeout. at org.jboss.mq.Connection$PingTask.run(Connection.java:1179) atEDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) at java.lang.Thread.run(Thread.java:536) I believe that JBossMQ died, because when I attempt to send a message to atopic i get the following error: 2002-07-24 10:59:25,591 ERROR [STDERR] org.jboss.mq.SpyJMSException: Cannotsend a message to the JMS server I have a very vanilla install of JBoss3.0.1rc1 (plus tomcat). To thejbossmq-destinations-service.xml, I have only added: name="jboss.mq.destination:service=Topic,name=HitTopic"> jboss.mq:service=DestinationManager Does anyone have any clue why this happened? Here's an except from my Server.log: 2002-07-24 09:20:31,326 DEBUG[org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemovernotifying pools, interval: 452002-07-24 09:28:01,326 DEBUG[org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemovernotifying pools, interval: 452002-07-24 09:30:21,154 DEBUG [org.jboss.mq.il.oil.OILClientILService]Closing receiver connections on port: 24642002-07-24 09:30:21,170 WARN [org.jboss.mq.il.oil.OILServerILService]Connection failure (1).java.net.SocketException: Connection reset by peer: JVM_recv in socket inputstream read at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:116) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) at java.io.BufferedInputStream.read(BufferedInputStream.java:201) atjava.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2118) atjava.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2301) atjava.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2368) atjava.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2440) atjava.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.java:2589) at java.io.ObjectInputStream.readByte(ObjectInputStream.java:837) atorg.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:190) at java.lang.Thread.run(Thread.java:536)2002-07-24 09:31:07,466 WARN [org.jboss.mq.Connection] Connection failure: org.jboss.mq.SpyJMSException: Connection Failed at org.jboss.mq.Connection.asynchFailure(Connection.java:603) at org.jboss.mq.Connection$PingTask.run(Connection.java:1187) atEDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) at java.lang.Thread.run(Thread.java:536)linked exception is:java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) atjava.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:126) atjava.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127) atjava.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.java:1583) at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:639) at org.jboss.mq.il.oil.OILServerIL.waitAnswer(OILServerIL.java:520) at org.jboss.mq.il.oil.OILServerIL.ping(OILServerIL.java:395) at org.jboss.mq.Connection.pingServer(Connection.java:1021) at org.jboss.mq.Connection$PingTask.run(Connection.java:1183) atEDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) at java.lang.Thread.run(Thread.java:536)2002-07-24 09:32:07,466 WARN [org.jboss.mq.Connection] Connection failure: org.jboss.mq.SpyJMSException: Connection Failed at org.jboss.mq.Connection.asynchFailure(Connection.java:603) at org.jboss.mq.Connection$PingTask.run(Connection.java:1187) atEDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) at java.lang.Thread.run(Thread.java:536)linked exception is:java.io.IOException: ping timeout. at org.jboss.mq.Connection$PingTask.run(Connection.java:1179) atEDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:364) at
[JBoss-user] JBossMQ Died Mysteriously
I let jboss sit for about 20 hours and when i came back it was constantly dumping the following to the console: 2002-07-24 11:00:05,060 WARN [org.jboss.mq.Connection] Connection failure: org.jboss.mq.SpyJMSException: Connection Failed at org.jboss.mq.Connection.asynchFailure(Connection.java:603) at org.jboss.mq.Connection$PingTask.run(Connection.java:1187) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:36 4) at java.lang.Thread.run(Thread.java:536) linked exception is: java.io.IOException: ping timeout. at org.jboss.mq.Connection$PingTask.run(Connection.java:1179) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:36 4) at java.lang.Thread.run(Thread.java:536) I believe that JBossMQ died, because when I attempt to send a message to a topic i get the following error: 2002-07-24 10:59:25,591 ERROR [STDERR] org.jboss.mq.SpyJMSException: Cannot send a message to the JMS server I have a very vanilla install of JBoss3.0.1rc1 (plus tomcat). To the jbossmq-destinations-service.xml, I have only added: jboss.mq:service=DestinationManager Does anyone have any clue why this happened? Here's an except from my Server.log: 2002-07-24 09:20:31,326 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 45 2002-07-24 09:28:01,326 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 45 2002-07-24 09:30:21,154 DEBUG [org.jboss.mq.il.oil.OILClientILService] Closing receiver connections on port: 2464 2002-07-24 09:30:21,170 WARN [org.jboss.mq.il.oil.OILServerILService] Connection failure (1). java.net.SocketException: Connection reset by peer: JVM_recv in socket input stream read at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:116) at java.io.BufferedInputStream.fill(BufferedInputStream.java:183) at java.io.BufferedInputStream.read(BufferedInputStream.java:201) at java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2118) at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputSt ream.java:2301) at java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java :2368) at java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2 440) at java.io.ObjectInputStream$BlockDataInputStream.readByte(ObjectInputStream.ja va:2589) at java.io.ObjectInputStream.readByte(ObjectInputStream.java:837) at org.jboss.mq.il.oil.OILServerILService$Client.run(OILServerILService.java:19 0) at java.lang.Thread.run(Thread.java:536) 2002-07-24 09:31:07,466 WARN [org.jboss.mq.Connection] Connection failure: org.jboss.mq.SpyJMSException: Connection Failed at org.jboss.mq.Connection.asynchFailure(Connection.java:603) at org.jboss.mq.Connection$PingTask.run(Connection.java:1187) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:36 4) at java.lang.Thread.run(Thread.java:536) linked exception is: java.net.SocketException: Connection reset by peer: socket write error at java.net.SocketOutputStream.socketWrite0(Native Method) at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92) at java.net.SocketOutputStream.write(SocketOutputStream.java:126) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:69) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:127) at java.io.ObjectOutputStream$BlockDataOutputStream.flush(ObjectOutputStream.ja va:1583) at java.io.ObjectOutputStream.flush(ObjectOutputStream.java:639) at org.jboss.mq.il.oil.OILServerIL.waitAnswer(OILServerIL.java:520) at org.jboss.mq.il.oil.OILServerIL.ping(OILServerIL.java:395) at org.jboss.mq.Connection.pingServer(Connection.java:1021) at org.jboss.mq.Connection$PingTask.run(Connection.java:1183) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:36 4) at java.lang.Thread.run(Thread.java:536) 2002-07-24 09:32:07,466 WARN [org.jboss.mq.Connection] Connection failure: org.jboss.mq.SpyJMSException: Connection Failed at org.jboss.mq.Connection.asynchFailure(Connection.java:603) at org.jboss.mq.Connection$PingTask.run(Connection.java:1187) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:36 4) at java.lang.Thread.run(Thread.java:536) linked exception is: java.io.IOException: ping timeout. at org.jboss.mq.Connection$PingTask.run(Connection.java:1179) at EDU.oswego.cs.dl.util.concurrent.ClockDaemon$RunLoop.run(ClockDaemon.java:36 4) at java.lang.Thread.run(Thread.java:536) 2002-07-24 09:33:07
RE: [JBoss-user] Classloader Question
Title: Message Excellent. thanks. .peter -Original Message-From: Sacha Labourey [mailto:[EMAIL PROTECTED]]Sent: Monday, July 01, 2002 3:24 AMTo: [EMAIL PROTECTED]Subject: RE: [JBoss-user] Classloader Question Yes, both EAR will share a common struts.jar "thanks" to the UnifiedClassLoader (UCL). If you want two distincts UCL, you need to configure your EAR accordingly: http://www.jboss.org/forums/thread.jsp?forum=66&thread=15984&message=3721110 -Message d'origine-De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]De la part de Peter LuttrellEnvoyé : lundi, 1 juillet 2002 03:10À : [EMAIL PROTECTED]Objet : [JBoss-user] Classloader Question Is the classpath isolated for separate ears? If the classpath is not isolated, does anyone have a recommended strategy for handling ears with different versions of the same jar? I just deployed 2 ears with radically different versions of the struts jar in them. Depending on which one loaded first the opposite blew up with errors that appear to be related to version changes with struts. If i deploy the ears separately they work fine. I am using JBoss3.0.1rc1 with tomcat4.0.3. Is this possibly a bug? .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fiel ds
I can see how nulls could be a problem. But I don't think are my problem in this case, for 2 reasons: The db is completely new and all data is added through MyBean. In the ejbCreate method i have null/empty string checks on these three fields (also eliminated from the example code below). The 2nd reason that I don't think that nulls are the problem is that when I restart the problem, goes away. I can double check my db when I get into work tomorrow. Any more ideas? .peter -Original Message- From: Dain Sundstrom To: [EMAIL PROTECTED] Sent: 6/27/02 3:09 PM Subject: Re: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fiel ds Ok, I trust that you implemented it correctly. If you don't then nothing works. Usually the problem you are seeing is because you have existing data in you database that has null values, and you attempt to load the null values into a not-null fields. All pk members must be not-null (required by the SQL spec) and all primitive values must be not-null (Java primitives can't be null). -dain Luttrell, Peter wrote: > actually i have, I just omitted it in the example. > it definiatly compiles. > > .peter > > -Original Message- > From: Dain Sundstrom [mailto:[EMAIL PROTECTED]] > Sent: Thursday, June 27, 2002 2:32 PM > To: [EMAIL PROTECTED] > Subject: Re: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR > fields > > > You have not implemented equals in your pk class. That code shouldn't > even compile? > > -dain > > Luttrell, Peter wrote: > >>I have an entity bean with a compound primary key, where one of the >>fields is a cmr field. The entity bean works perfectly after the first >>deployment. I can set primary key, as well as do lookups and such. But >>after I redeploy (or restart) I get the following error, whenever i >>attempt to findByPrimaryKey for a valid record: >> >>13:45:34,612 ERROR [STDERR] javax.ejb.FinderException: Find failed: >>javax.ejb.EJBException: Internal >> error getting results for field member key >>Embedded Exception >>Unable to load a ResultSet column into a variable of type 'MyKey' >>13:45:34,675 ERROR [STDERR] at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(J >>DBCAbstractQueryCommand.java:143) >>13:45:34,690 ERROR [STDERR] at >>org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBC >>FindEntityCommand.java:44) >>... >> >>My question is, should what I am doing work? If so then this is a bug >>(or some other problem). If not, the beanvalidation should detect this >>senerio and not allow the beans deployment. >> >>Here's some more details on what I am doing: >> >> >>MyBean >>MyKey >>... >>key >>year >>month >>key >> ... >> >> >> >> >> >> >> > . > >>One >> >>...some other bean >> >> >>allMyBeans >> java.util.Collection >> >> >> >> > . > >>Many >> >>MyBean >> >> >>related >> >> >> >> >>public class MyKey implements Serializable{ >> >>private String name; >>private Integer month; >>private Integer year; >> >>public MyKey(){ >>} >> >>public MyKey(Integer year, Integer month, String name){ >>this.name= name; >>this.month = month; >>this.year = year; >>} >> >>public String getName(){ >>return name; >>} >> >>public Integer getMonth(){ >>return month; >>} >> >>public Integer getYear(){ >>return year; >>} >> >>public boolean equals(Object obj){ >>} >> >>public int hashCode(){ >>return getName().hashCode() ^ getYear().hashCode() ^ >>getMonth().hashCode(); >>} >>} >> >>public abstract class MyBeanimplements EntityBean { >> >>public abstract MyKey getKey(); >>public abstract Integer getYear(); >>public abstract Integer getMonth(); >> >>public abstr
RE: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields
Actually, i was incorrect in my first post where i said it happens on redeployment (or restart). Restarting jboss resolves the problem. The problem only happens on hotdeployments. .peter -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 2:32 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields You have not implemented equals in your pk class. That code shouldn't even compile? -dain Luttrell, Peter wrote: > I have an entity bean with a compound primary key, where one of the > fields is a cmr field. The entity bean works perfectly after the first > deployment. I can set primary key, as well as do lookups and such. But > after I redeploy (or restart) I get the following error, whenever i > attempt to findByPrimaryKey for a valid record: > > 13:45:34,612 ERROR [STDERR] javax.ejb.FinderException: Find failed: > javax.ejb.EJBException: Internal > error getting results for field member key > Embedded Exception > Unable to load a ResultSet column into a variable of type 'MyKey' > 13:45:34,675 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(J > DBCAbstractQueryCommand.java:143) > 13:45:34,690 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBC > FindEntityCommand.java:44) > ... > > My question is, should what I am doing work? If so then this is a bug > (or some other problem). If not, the beanvalidation should detect this > senerio and not allow the beans deployment. > > Here's some more details on what I am doing: > > > MyBean > MyKey > ... > key > year > month > key >... > > > > > > > . > One > > ...some other bean > > > allMyBeans > java.util.Collection > > > > . > Many > > MyBean > > > related > > > > > public class MyKey implements Serializable{ > > private String name; > private Integer month; > private Integer year; > > public MyKey(){ > } > > public MyKey(Integer year, Integer month, String name){ > this.name= name; > this.month = month; > this.year = year; > } > > public String getName(){ > return name; > } > > public Integer getMonth(){ > return month; > } > > public Integer getYear(){ > return year; > } > > public boolean equals(Object obj){ > } > > public int hashCode(){ > return getName().hashCode() ^ getYear().hashCode() ^ > getMonth().hashCode(); > } > } > > public abstract class MyBeanimplements EntityBean { > > public abstract MyKey getKey(); > public abstract Integer getYear(); > public abstract Integer getMonth(); > > public abstract void setKey(MyKey key); > public abstract void setYear(Integer year); > public abstract void setMonth(Integer month); > > public abstract RelatedLocal getRelated(); > public abstract void setRelated(RelatedLocal related); > > public MyKey ejbCreate(Integer year, Integer month, String name) > throws CreateException { > > MyKey key = new MyKey(year, month, name); > setKey(key); > > setYear(year); > setMonth(month); > return null; > } > > public void ejbPostCreate(Integer year, Integer month, String name) { > > RelatedHomeLocal home = > RelatedLocal related = home.findByPrimaryKey(name); > setRelated(related); > } > . > } > --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the mater
RE: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields
I have also added setters in my key class, but this didn't seam to help. .peter -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 2:32 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields You have not implemented equals in your pk class. That code shouldn't even compile? -dain Luttrell, Peter wrote: > I have an entity bean with a compound primary key, where one of the > fields is a cmr field. The entity bean works perfectly after the first > deployment. I can set primary key, as well as do lookups and such. But > after I redeploy (or restart) I get the following error, whenever i > attempt to findByPrimaryKey for a valid record: > > 13:45:34,612 ERROR [STDERR] javax.ejb.FinderException: Find failed: > javax.ejb.EJBException: Internal > error getting results for field member key > Embedded Exception > Unable to load a ResultSet column into a variable of type 'MyKey' > 13:45:34,675 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(J > DBCAbstractQueryCommand.java:143) > 13:45:34,690 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBC > FindEntityCommand.java:44) > ... > > My question is, should what I am doing work? If so then this is a bug > (or some other problem). If not, the beanvalidation should detect this > senerio and not allow the beans deployment. > > Here's some more details on what I am doing: > > > MyBean > MyKey > ... > key > year > month > key >... > > > > > > > . > One > > ...some other bean > > > allMyBeans > java.util.Collection > > > > . > Many > > MyBean > > > related > > > > > public class MyKey implements Serializable{ > > private String name; > private Integer month; > private Integer year; > > public MyKey(){ > } > > public MyKey(Integer year, Integer month, String name){ > this.name= name; > this.month = month; > this.year = year; > } > > public String getName(){ > return name; > } > > public Integer getMonth(){ > return month; > } > > public Integer getYear(){ > return year; > } > > public boolean equals(Object obj){ > } > > public int hashCode(){ > return getName().hashCode() ^ getYear().hashCode() ^ > getMonth().hashCode(); > } > } > > public abstract class MyBeanimplements EntityBean { > > public abstract MyKey getKey(); > public abstract Integer getYear(); > public abstract Integer getMonth(); > > public abstract void setKey(MyKey key); > public abstract void setYear(Integer year); > public abstract void setMonth(Integer month); > > public abstract RelatedLocal getRelated(); > public abstract void setRelated(RelatedLocal related); > > public MyKey ejbCreate(Integer year, Integer month, String name) > throws CreateException { > > MyKey key = new MyKey(year, month, name); > setKey(key); > > setYear(year); > setMonth(month); > return null; > } > > public void ejbPostCreate(Integer year, Integer month, String name) { > > RelatedHomeLocal home = > RelatedLocal related = home.findByPrimaryKey(name); > setRelated(related); > } > . > } > --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other inst
RE: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields
actually i have, I just omitted it in the example. it definiatly compiles. .peter -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 27, 2002 2:32 PM To: [EMAIL PROTECTED] Subject: Re: [JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields You have not implemented equals in your pk class. That code shouldn't even compile? -dain Luttrell, Peter wrote: > I have an entity bean with a compound primary key, where one of the > fields is a cmr field. The entity bean works perfectly after the first > deployment. I can set primary key, as well as do lookups and such. But > after I redeploy (or restart) I get the following error, whenever i > attempt to findByPrimaryKey for a valid record: > > 13:45:34,612 ERROR [STDERR] javax.ejb.FinderException: Find failed: > javax.ejb.EJBException: Internal > error getting results for field member key > Embedded Exception > Unable to load a ResultSet column into a variable of type 'MyKey' > 13:45:34,675 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(J > DBCAbstractQueryCommand.java:143) > 13:45:34,690 ERROR [STDERR] at > org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBC > FindEntityCommand.java:44) > ... > > My question is, should what I am doing work? If so then this is a bug > (or some other problem). If not, the beanvalidation should detect this > senerio and not allow the beans deployment. > > Here's some more details on what I am doing: > > > MyBean > MyKey > ... > key > year > month > key >... > > > > > > > . > One > > ...some other bean > > > allMyBeans > java.util.Collection > > > > . > Many > > MyBean > > > related > > > > > public class MyKey implements Serializable{ > > private String name; > private Integer month; > private Integer year; > > public MyKey(){ > } > > public MyKey(Integer year, Integer month, String name){ > this.name= name; > this.month = month; > this.year = year; > } > > public String getName(){ > return name; > } > > public Integer getMonth(){ > return month; > } > > public Integer getYear(){ > return year; > } > > public boolean equals(Object obj){ > } > > public int hashCode(){ > return getName().hashCode() ^ getYear().hashCode() ^ > getMonth().hashCode(); > } > } > > public abstract class MyBeanimplements EntityBean { > > public abstract MyKey getKey(); > public abstract Integer getYear(); > public abstract Integer getMonth(); > > public abstract void setKey(MyKey key); > public abstract void setYear(Integer year); > public abstract void setMonth(Integer month); > > public abstract RelatedLocal getRelated(); > public abstract void setRelated(RelatedLocal related); > > public MyKey ejbCreate(Integer year, Integer month, String name) > throws CreateException { > > MyKey key = new MyKey(year, month, name); > setKey(key); > > setYear(year); > setMonth(month); > return null; > } > > public void ejbPostCreate(Integer year, Integer month, String name) { > > RelatedHomeLocal home = > RelatedLocal related = home.findByPrimaryKey(name); > setRelated(related); > } > . > } > --- Sponsored by: ThinkGeek at http://www.ThinkGeek.com/ ___ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instr
[JBoss-user] [JBossCMP2.0] Compound Primary Keys and CMR fields
I have an entity bean with a compound primary key, where one of the fields is a cmr field. The entity bean works perfectly after the first deployment. I can set primary key, as well as do lookups and such. But after I redeploy (or restart) I get the following error, whenever i attempt to findByPrimaryKey for a valid record: 13:45:34,612 ERROR [STDERR] javax.ejb.FinderException: Find failed: javax.ejb.EJBException: Internal error getting results for field member keyEmbedded ExceptionUnable to load a ResultSet column into a variable of type 'MyKey'13:45:34,675 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:143)13:45:34,690 ERROR [STDERR] at org.jboss.ejb.plugins.cmp.jdbc.JDBCFindEntityCommand.execute(JDBCFindEntityCommand.java:44)... My question is, should what I am doing work? If so then this is a bug (or some other problem). If not, the beanvalidation should detect this senerio and not allow the beans deployment. Here's some more details on what I am doing: MyBean MyKey ... key year monthkey ... . One ...some other bean allMyBeans java.util.Collection . Many MyBean related public class MyKey implements Serializable{ private String name; private Integer month; private Integer year; public MyKey(){ } public MyKey(Integer year, Integer month, String name){ this.name= name; this.month = month; this.year = year; } public String getName(){ return name; } public Integer getMonth(){ return month; } public Integer getYear(){ return year; } public boolean equals(Object obj){} public int hashCode(){ return getName().hashCode() ^ getYear().hashCode() ^ getMonth().hashCode(); } } public abstract class MyBeanimplements EntityBean { public abstract MyKey getKey(); public abstract Integer getYear(); public abstract Integer getMonth(); public abstract void setKey(MyKey key); public abstract void setYear(Integer year); public abstract void setMonth(Integer month); public abstract RelatedLocal getRelated(); public abstract void setRelated(RelatedLocal related); public MyKey ejbCreate(Integer year, Integer month, String name) throws CreateException { MyKey key = new MyKey(year, month, name); setKey(key); setYear(year); setMonth(month); return null; } public void ejbPostCreate(Integer year, Integer month, String name) { RelatedHomeLocal home = RelatedLocal related = home.findByPrimaryKey(name);setRelated(related); } . } This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
RE: [JBoss-user] [JBOSSSX] Disable Authentication Cache?
Title: Message both levels. since the JaasSecurityManager is used for authentication and authorization for both. i wrote my own LoginModule that verifies name, password and also an account lock (specific to my app) in order to authorize the user. So the following scenario doesn't work: 1) user logs in successfully (accountLock==false) 2) an administrator locks the account 3) the same user attempts to login (accountLock==true) and succeeds. now if my LoginModule were called it would accurately reject the request, but my login module is not called. There appears to be because a cache that is caching positive logins based on only the username and password, hence eliminating the accountLock check that I have. thus i assume that to fix my problem i need to disable the authentication cache. .peter -Original Message-From: Dmitri Colebatch [mailto:[EMAIL PROTECTED]]Sent: Monday, June 10, 2002 10:08 PMTo: Peter LuttrellCc: [EMAIL PROTECTED]Subject: Re: [JBoss-user] [JBOSSSX] Disable Authentication Cache? at what level? ejb or web? - Original Message - From: Peter Luttrell To: 'Dmitri Colebatch' Sent: Tuesday, June 11, 2002 12:58 PM Subject: FW: [JBoss-user] [JBOSSSX] Disable Authentication Cache? thanks again for the info on the other (subjectless) thread. do you happen to know anything about my other post? -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Luttrell, PeterSent: Monday, June 10, 2002 2:31 PMTo: '[EMAIL PROTECTED]'; 'Scott M Stark'Subject: [JBoss-user] [JBOSSSX] Disable Authentication Cache? How do you disable the authentication cache in the JaasSecurityManager? This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
[JBoss-user] [JBOSSSX] Disable Authentication Cache?
How do you disable the authentication cache in the JaasSecurityManager? This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.
[JBoss-user] JaasSecurityManager: Disable Authentication Cache?
How do you disable the authentication cache in the JaasSecurityManager? Setting the DefaultCacheTimeout attribute to 0 or -1 doesn't work (in fact doing such results in all requests coming back as the 403 error page). If the answer is to set the AuthenticationCacheJndiName to something, would you please explain how or point to an example. The description in the 3.0QuickStart doc, as well has the 2.4.4 pay documentation doesn't make any sense to me. thanks. .peter This transmission contains information solely for intended recipient and may be privileged, confidential and/or otherwise protect from disclosure. If you are not the intended recipient, please contact the sender and delete all copies of this transmission. This message and/or the materials contained herein are not an offer to sell, or a solicitation of an offer to buy, any securities or other instruments. The information has been obtained or derived from sources believed by us to be reliable, but we do not represent that it is accurate or complete. Any opinions or estimates contained in this information constitute our judgment as of this date and are subject to change without notice. Any information you share with us will be used in the operation of our business, and we do not request and do not want any material, nonpublic information. Absent an express prior written agreement, we are not agreeing to treat any information confidentially and will use any and all information and reserve the right to publish or disclose any information you share with us.