Displaying keyword search results 1 - 10
Created by Fang on September 07, 2009 20:44:15 Last update: November 03, 2011 14:43:19
Step 1: Repackage a web app as EAR A Java EE application is a multimodule Maven project. At the very least you'll need to package a WAR and an EAR. To get started, I'll simply re-package the simple webapp as an EAR. Create a directory named javaee-app Copy the webapp from here to javaee-app . Rename struts1app to webapp . Create pom.xml under javaee-app :
<project> <modelVersion>4.0.0</modelVersion>...Create a directory named ear under javaee-app . Create pom.xml under ear :
<project> <modelVersion>4.0.0</modelVersion>...Modify pom.xml in the webapp directory so that it looks like this:
<project> <modelVersion>4.0.0</modelVersion> ...Build with " mvn package " in the javaee-app directory. You can see that ear-1.0.ear is successfully generated in javaee-app/ear/target . Maven successfully resolves dependencies between the sub-projects....
Created by Dr. Xi on August 11, 2007 15:56:47 Last update: July 19, 2011 08:15:55
Here's a list of common TCP ports. You can find a more complete list here: http://www.gasmi.net/docs/tcp.html . Port Number Service Description 21 FTP File Transfer Protocol 22 SSH Secure Shell 23 Telnet Telnet remote login 25 SMTP Simple Mail Transfer Protocol 70 gopher Gopher 79 finger Finger 80 HTTP Hyper Text Transfer Protocol (WWW) 88 Kerberos Kerberos authentication 94 tivoli Tivoli Object Dispatcher 110 pop3 Post Office Protocol Version 3 123 ntp Network Time Protocol 137 netbios NetBIOS Name Service 138 netbios NetBIOS Datagram 139 netbios NetBIOS Session 143 imap Internet Message Access Protocol 161 snmp Simple Network Management Protocol 162 snmptrap SNMP trap 194 irc Internet Relay Chat Protocol 389 ldap Lightweight Directory Access Protocol 443 https Secure HTTP 445 SMB MS Server Message...
Created by voodoo on November 25, 2010 00:03:53 Last update: November 25, 2010 00:03:53
It seems that the JDBC standard way to create a BLOB is to call Connection.createBlob . However, this does not work for PostgreSQL (as of version 9.0-801 jdbc4):
Exception in thread "main" org.postgresql.util.PSQ...The workaround is to call a PostgreSQL function to create the Blob, then use JDBC to update it:
Connection conn = jdbcTemplate.getDataSource().get...Oracle Note: the Oracle way function to create an empty BLOB is EMPTY_BLOB() .
stmt.execute ("INSERT INTO my_blob_table VALUES ('...
Created by nogeek on April 25, 2010 05:09:14 Last update: April 25, 2010 05:10:46
Oracle Web Cache version used:
Oracle Application Server Web Cache 10.1.2.3.0 ...The test page is a simple Struts action sending a URL redirect:
public ActionForward execute(ActionMapping map...Web Cache setup Origin server Host Name Port oas.host 7777 Site Host Name Port URL Path Prefix webcache.host 80 Test results Request directly to the OC4J (Oracle Application Server):
C:\work\testAppWebApp2>curl --dump-header - http:/...Request to Oracle Web Cache:
C:\work\testAppWebApp2>curl --dump-header - http:/...Notice that Oracle Web Cache correctly translated the host name in the header and HTML page. However, the port number remained that of the Oracle App Server.
Created by Dr. Xi on April 07, 2010 15:46:14 Last update: April 07, 2010 15:46:14
SQL> desc user_role_privs; Name ...Further reference: Oracle Database Security Guide (11g Release 2)
Created by Dr. Xi on April 06, 2010 22:55:13 Last update: April 06, 2010 22:56:38
These are the steps to diagnose the "javax.jms.Destination found at the specified destination-location" error an MDB in the Oracle application server (oc4j) environment. The data source is correctly configured and connection can be successfully established. Test this from the Oracle AS em console. The destination queue exists and is started. If you are using PL/SQL Developer, you can check this by right clicking on the queue name and make sure that "Enqueue Enabled" and "Dequeue Enabled" are checked. Deployment descriptors are correctly set up. The database user used for the JDBC connection pool has the proper privileges to enqueue and dequeue. Usually this means that the database user is assigned the AQ_USER_ROLE . The ultimate test is to run some PL/SQL code in the oc4j...
Created by Dr. Xi on September 20, 2009 16:52:19 Last update: March 22, 2010 01:28:49
When I assemble a session bean without the proprietary deployment descriptor ( orion-ejb-jar.xml ), OC4J generates one like this (as can be seen from the OC4J management console):
<?xml version="1.0" encoding="utf-8"?> <ori...So I use this code to lookup the EJB:
import javax.naming.Context; import javax.namin...OC4J throws ClassCastException :
java.lang.ClassCastException: com.evermind[Oracle ...The JNDI browser (OC4J container home -> Administration -> JNDI browser) shows that the name simpleEjb_SimpleBeanLocal is bound to: com.evermind.server.ejb.StatelessSessionDefaultLocalHomeImpl Solution: Change the local name in the OC4J generated orion-ejb-jar.xml to simpleEjb_SimpleBeanLocal2 and put it in the EJB package. Redeploy. The JNDI browser shows that simpleEjb_SimpleBeanLocal is still bound to com.evermind.server.ejb.StatelessSessionDefaultLocalHomeImpl . But simpleEjb_SimpleBeanLocal2 is bound to the right proxy: SimpleBean_LocalProxy_5f4b5e5 .
Created by Dr. Xi on February 09, 2010 04:54:10 Last update: February 09, 2010 04:54:10
Use this to connect to oracle RAC (Real Application Cluster):
jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on) ...From Oracle Database JDBC Developer's Guide : Specifier Supported Drivers Example Oracle Net connection descriptor Thin, OCI Thin, using an address list: url="jdbc:oracle:thin:@(DESCRIPTION= (LOAD_BALANCE=on) (ADDRESS_LIST= (ADDRESS=(PROTOCOL=TCP)(HOST=host1) (PORT=1521)) (ADDRESS=(PROTOCOL=TCP)(HOST=host2)(PORT=1521))) (CONNECT_DATA=(SERVICE_NAME=service_name)))" OCI, using a cluster: "jdbc:oracle:oci:@(DESCRIPTION= (ADDRESS=(PROTOCOL=TCP)(HOST=cluster_alias) (PORT=1521)) (CONNECT_DATA=(SERVICE_NAME=service_name)))" Thin-style service name Thin "jdbc:oracle:thin:scott/tiger@//myhost:1521/myservicename" LDAP syntax Thin "jdbc:oracle:thin:@ldap://ldap.example.com:7777/sales,cn=OracleContext,dc=com" Bequeath connection OCI Empty. That is, nothing after @ "jdbc:oracle:oci:scott/tiger/@" TNSNames alias Thin, OCI OracleDataSource ods = new OracleDataSource(); ods.setTNSEntryName("MyTNSAlias");
Created by Dr. Xi on February 06, 2010 00:25:00 Last update: February 06, 2010 00:26:50
grant unlimited tablespace to <user>or
alter user <user_name> quota 250m on <tablespace_n...Example:
SQL> create table customer ( 2 id number(9),...
Created by Dr. Xi on February 06, 2010 00:15:01 Last update: February 06, 2010 00:15:01
This query lists the tablespaces in Oracle:
SQL> select * from v$tablespace; TS#...