This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sachinhandiekar.oracle.aq; | |
import java.sql.Connection; | |
import java.sql.SQLException; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.Session; | |
import javax.sql.DataSource; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.xml.sax.InputSource; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import javax.xml.transform.OutputKeys; | |
import javax.xml.transform.Source; | |
import javax.xml.transform.Transformer; | |
import javax.xml.transform.sax.SAXSource; | |
import javax.xml.transform.sax.SAXTransformerFactory; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vbs="http://www.w3.org/1999/XSL/Transform" xmlns:msxml="urn:schemas-microsoft-com:xslt"> | |
<xsl:output omit-xml-declaration="yes" /> | |
<xsl:template match="node()|@*"> | |
<xsl:copy> | |
<xsl:apply-templates select="node()|@*" /> | |
</xsl:copy> | |
</xsl:template> | |
<!-- Just change the match="/*" to match="*" ; if you want to add namespace in all elements --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> | |
<xsl:template match="*"> | |
<xsl:element name="{local-name()}"> | |
<xsl:apply-templates select="@* | node()" /> | |
</xsl:element> | |
</xsl:template> | |
<xsl:template match="@*"> | |
<xsl:attribute name="{local-name()}"> | |
<xsl:value-of select="." /> | |
</xsl:attribute> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.foo.Bar; | |
// Import log4j classes. | |
import org.apache.log4j.Logger; | |
import org.apache.log4j.BasicConfigurator; | |
public class MyApp { | |
// Define a static logger variable so that it references the | |
// Logger instance named "MyApp". |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Scanner; | |
import java.util.StringTokenizer; | |
public class JollyJumper { | |
public static String JOLLY = "Jolly"; | |
public static String NOT_JOLLY = "Not jolly"; | |
public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> | |
<!-- Bean declarations goes here --> | |
</beans> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sample; | |
public class Address { | |
private String city; | |
private String country; | |
public Address(String city, String country) { | |
this.city = city; | |
this.country = country; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.sachinhandiekar.oracle.aq; | |
import java.util.Enumeration; | |
import javax.jms.Destination; | |
import javax.jms.JMSException; | |
import javax.jms.Message; | |
import javax.jms.Queue; | |
import javax.jms.QueueBrowser; | |
import javax.jms.Session; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.springframework.org/schema/beans" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> | |
<bean class="org.springframework.jmx.support.MBeanServerConnectionFactoryBean" id="mbeanServerConnection"> | |
<property name="serviceUrl" value="service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi"> | |
</property></bean> | |
<bean class="com.sample.QueueSizeCounter" id="queueCounter"> | |
<property name="mBeanServerConnection" ref="mbeanServerConnection"> | |
</property></bean> | |