Zemian is correct. Try something like this out...
MBeanServer server = context.getManagementStrategy().getManagementAgent().getMBeanServer(); ObjectName routeName = ObjectName.getInstance("org.apache.camel:context=localhost/camel-1,type=routes,name=\"route1\""); Date lastCompleted = (Date) mbeanServer.getAttribute(routeName, "LastExchangeCompletedTimestamp"); On Wed, Oct 16, 2013 at 7:42 PM, saltnlight5 <saltnlig...@gmail.com> wrote: > Hi, > > Camel can expose itself onto a MBeanServer, and that's how you see them in > jconsole. You can get to the MBeanServer through > camelContext.getManagementStrategy().getManagementAgent().getMBeanServer(). > Once you have that, you can use the standard MBeanServer API to query any > of > those mbean you see in jconsole with its ObjectName. > > -- > Zemian > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/API-to-determine-the-last-time-a-route-was-successfully-executed-tp5741686p5741720.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- *Christian Posta* http://www.christianposta.com/blog twitter: @christianposta