發表文章

目前顯示的是 9月, 2011的文章

Solution for Eclipse hangs at startup

In your workspace directory perform the following steps: cd .metadata/.plugins mv org.eclipse.core.resources org.eclipse.core.resources.bak Start eclipse. (It should show an error message or an empty workspace because no project is found.) Close all open editors tabs. Change to another perspective e.g. Java. Exit eclipse. rm -rf org.eclipse.core.resources (Delete the newly created directory.) mv org.eclipse.core.resources.bk/ org.eclipse.core.resources (Restore the original directory.) Start eclipse and start working.

Web service (JAX-WS) timeout

//1 minute for connection (( BindingProvider ) wsPort ). getRequestContext (). put ( " com.sun.xml.ws.connect.timeout " , 1 * 60 * 1000 ); //3 minutos for request (( BindingProvider ) wsPort ). getRequestContext (). put ( " com.sun.xml.ws.request.timeout " , 3 * 60 * 1000 );   or  import com.sun.xml.ws.developer.JAXWSProperties use JAXWSProperties. CONNECT_TIMEOUT and JAXWSProperties. REQUEST_TIMEOUT  

Executable jar with onejar-maven-plugin

Onejar-maven-plugin collects your application including dependencies, into one executable jar. It's both easy and works well! Problem If you have ever tried doing this before with Maven, you have probably used maven-assembly-plugin , which would leave the door open for classpath problems! It would extract all your dependency jars in one directory together with all your class files and all other classpath resources. The problem is that everything ended up in a big mix, with classpath resources possibly overwriting each other. For example, if two dependencies each had a log4j.properties file in their jar, one log4j.properties would overwrite the other. No more of that mess! Solution Enter maven-onejar-plugin. It lets all your dependency jars stay jars, and your code is in its own jar. All of those jars are put in a bigger jar, which is made executable. Configuration It may sound weird, but it's quite elegant! Just put this in your pom.xml 's tag to make it wo

Turn off WebLogic basic authentication

Editing config.xml To set the e enforce-valid-basic-auth-credentials flag, perform the following steps: 1. Add the element to config.xml within the element. false 2. Start or restart all of the servers in the domain. ============================================= Using WebLogic Scripting Tool (WLST) Using WLST to Check the Value of enforce-valid-basic-auth-credentials The Administration Console does not display or log the enforce-valid-basic-auth-credentials setting. However, you can use WLST to check the value in a running server. Remember that enforce-valid-basic-auth-credentials is a domain-wide setting. The WLST session shown below demonstrates how to check the value of the enforce-valid-basic-auth-credentials flag in a sample running server. Example: wls:/offline> connect('weblogic','weblogic123','t3://localhost:7002') Connecting to t3://localhost:7002 with userid weblogic ... Successfully connected to Admin Server 'AdminS