I’d like to make you aware of the excellent book Real World Java EE Patterns – Rethinking Best Practices by Adam Bien (blog), a Java Champion and renowned consultant, software architect and Java EE standardization comitee member. I’d absolutely recommend it to any architect or developer serious with Java EE 5 or 6 development, evenContinue reading “Book: Real World Java EE Patterns – Rethinking Best Practices (review & digest)”
Tag Archives: javaEE
Introducing Facelets
You might have already heard about Facelets (docs), a library for Java Server Faces (JSF), and wondered why it is popular and what it is good for. I’ve wondered too and now I want to share the answers with you. Warning: I’m a novice to Facelets and some things may be not completely exact. FaceletsContinue reading “Introducing Facelets”
Troubleshooting Class/Resource Loading on an Application Server
If you need to find out where is a certain class loaded from or where a class has loaded a resource (typically a configuration file) from, you can use the JSP below – just put it to your web app and point a browser to it. Note: The resource loading tracking assumes that the loadingContinue reading “Troubleshooting Class/Resource Loading on an Application Server”
RAD, WAS 6 Test Env and J2EE security: getting rid of “No received or invocation credential exist on the thread”
Recently I started a new J2EE project that required j2ee security. Unfortunately Rational app. Developer 6 seemed to have some problems running a WAS Test Environment in this way, at least with the default setup. I encountered 2 problems: RAD wasn’t able to connect to the server at all, throwing some security exceptions. The solutionContinue reading “RAD, WAS 6 Test Env and J2EE security: getting rid of “No received or invocation credential exist on the thread””
Sending a SOAP request to a Web Service via URLConnection
You may want to test you web service by sending it a manually composed request and reading the XML returned. Here’s how to do it (e.g. using BeanShell in jEdit): The SOAP request <?xml version=”1.0″ encoding=”utf-16″?> <soap:Envelope xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema”> <soap:Body> <getUserByEmail xmlns=”http://service.w3.ibm.com”> <iuser>jholy@example.com</iuser> </getUserByEmail> </soap:Body> </soap:Envelope> The Java code String soapXml = // jEdit:Continue reading “Sending a SOAP request to a Web Service via URLConnection”
Redeploy an application (ear/war/…) on JBoss
A) Via JMX-console find jboss.system:service=MainDeployer invoke listDeployed – find something like: org.jboss.deployment.DeploymentInfo@d78e875f { url=file:/C:/jboss-3.2.3/server/default/deploy/tap.ear } copy the url, go back and invoke Redeploy with the url (file:/C:/…) as the parameter. B) From the command line The operations that can be invoked via the JBoss JMX console can also be invoked by the cmd lineContinue reading “Redeploy an application (ear/war/…) on JBoss”
Access EJB on JBoss from outside
How to acces an enterprise java bean (EJB) running on JBoss from a standalone application running outside JBoss? In the code you must, among others: Set properties for a naming context and create one to be able to look the EJB up Authenticate by JBoss by means of JAAS To run the application: Set theContinue reading “Access EJB on JBoss from outside”