Recently at the Agile Mumbai 2010 and Agile Bengaluru 2010 conference, we tried to make the conference as green (environment friendly) as possible. Following are the things we tried:
We did not hand over any conference program, printed hand-outs & slides or any other printed material (except for what the conference sponsor handed over). All this info is already available on our website. To make it convenient for the conference attendees, we took 3 large (A2 size) printout and stuck it outside each hall (track).
We also skipped handing over notepads & pens. I my experience very few people use them. Also those who want to use it, it’s easy to carry a notepad and pen.
Lunch and snacks were served in washable plates & steel spoons. Usually conferences use throw-away plates and plastic spoons.
For drinking tea, coffee & juice, we requested the conference participants to carry their own mugs & water bottles. This did not work all that well. We had only 3 people carry their own mug. In future, we plan to hand out a mug to each participant. (For Bengaluru conference, since it was in a hotel, they took care of serving tea & coffee in porcelain cups. Water was served is proper washable glasses)
Conserving Electricity: We tried to switch off projectors and Air Conditioners when ever possible. This is an area of huge improvement. We need to find more interesting ways to conserve energy.
Originally we had planned to request the participants to return their lanyards so we could reuse it. This one fell through the cracks.
At both the conferences we had an enlightening talk from Captain Planet (aka Saurabh Arora) showing the effect of global warming and how we can take small steps everyday to avoid further worsening the situation.
Overall I think there are lot more things we can do to make the conference more environmental friendly.
After switching to the DBCP (Database Connection Pool) drivers that comes bundled with Tomcat 5+, we started seeing a weird exception on our web app. If we leave our server idle for a long time (5-6 hrs) or if we put our laptop to sleep and 5-6+ hrs later when we bring up the laptop and try to access any page on our web app, we get the following error on the web page:
(The error was “could not inspect JDBC autocommit mode”)
When we see our logs, we find the following exception:
18:26:34,845 ERROR JDBCExceptionReporter:72-Connection com.mysql.jdbc.JDBC4Connection@36fbe6ab is closed.
SEVERE: could not inspect JDBC autocommit mode
org.hibernate.exception.GenericJDBCException: could not inspect JDBC autocommit mode
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:248)
at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:417)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1577)
at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:283)
...
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.sql.SQLException:Connection com.mysql.jdbc.JDBC4Connection@36fbe6ab is closed.
at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.checkOpen(DelegatingConnection.java:354)
at org.apache.tomcat.dbcp.dbcp.DelegatingConnection.getAutoCommit(DelegatingConnection.java:304)
at org.apache.tomcat.dbcp.dbcp.PoolingDataSource$PoolGuardConnectionWrapper.getAutoCommit(PoolingDataSource.java:224)
at org.hibernate.jdbc.ConnectionManager.isAutoCommit(ConnectionManager.java:185)
at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:239)
... 29 more
On carefully looking at the exception, we find:
Caused by: java.sql.SQLException:Connection com.mysql.jdbc.JDBC4Connection@36fbe6ab is closed.
From the exception its clear that the reason for this exception is that the db connection is closed. Which is in sync with our finding so far, idle server causes this problem.
What happens is, the Database closes the connections since they are inactive. But DBCP & hence hibernate still thinks those connections are active and tries to execute some command on them. This is when an exception is thrown.
We can easily simulate this exception. When everything is running fine, restart your DB and you’ll see the same exception when you try to access any dynamic page on your site.
The SQL query that will be used to validate connections from this pool
before returning them to the caller. If specified, this query MUST be an SQL SELECT statement that returns at least
one row.
testOnBorrow
true
The indication of whether objects will be validated before being
borrowed from the pool. If the object fails to validate, it will be
dropped from the pool, and we will attempt to borrow another. NOTE - for a true value to have any effect,
the validationQuery parameter must be set to a non-null
string.
Basically testOnBorrow is true by default, which means DBCP will test if the connection is valid (alive) before returning. But to test it, it needs a query using which it would validate the connection. Since in our case we did not specify any value, when hibernate would ask DBCP for a connection, it would just return a connection without testing if its a valid connection before returning. And then the stale connection throws an exception when we try to perform any operation on it. But if the validation query is specified, then DBCP will drop the connection and give us another valid connection. This avoiding this problem.
So the simple solution to this problem is to add a validationQuery to the connection pooling configuration (in our case it was the context.xml file).
Developing nations, which are trying to establish themselves as a IT Destination have to fight against the giants in the out-sourcing world. For many years companies used CMM as a way to get some attention. But CMM is
heavy weight,
expensive to get assessed
does not really fit small companies’ (20-50 people’s) needs.
Also in the last few years CMM has got a pretty bad reputation and hence its not necessarily a great marketing advantage.
Considering all this, what do companies do? What is the new shinny thing they should all run after. ..ta..da… Agile & Lean.
More suitable for their needs,
Some Customers are asking for it
Is also trendy and gives the marketing advantage over the big outsourcing companies.
The conference theme this year is “Post-Modern Agile - Be done with the Dogma“. The conference is really targeted at Agile practitioners, who want to explore ideas beyond the basic Agile stuff.
Also this year, for the first time, we are hosting the World-famous Programming with the Stars contest during the conference.
The conference theme this year is “Post-Modern Agile - Be done with the Dogma“. The conference is really targeted at Agile practitioners, who want to explore ideas beyond the basic Agile stuff.
Also this year, for the first time, we are hosting the World-famous Programming with the Stars contest during the conference.
Also for those who cannot attend the Mumbai conference, don’t worry. We have another conference coming up in Bengaluru. Check out: Agile Bengaluru 2010 Conference.