In JBoss documentation there is possibility to declare <no-tx-datasource> which states:
no-tx-datasource : This element is used to specify the (org.jboss.resource.connectionmanager) NoTxConnectionManager service configuration. NoTxConnectionManager is a JCA connection manager with no transaction support.
I'm curious what can be co...
I am working on a J2EE web application
Here we are using JSP and Struts
I know one can use
Client side validation (Using JavaScript)
Server side validation (Using Validation framework)
My question is which way is more proper and one should use in application and why?
...
I have a stateless session bean that contains one public method, several private methods, and some instance level variables. Below is a pseudo code example.
private int instanceLevelVar
public void methodA(int x) {
this.instanceLevelVar = x;
methodB();
}
private void methodB() {
System.out.println(instanceLevelVar);
}
What I'...
I want to get the root url of my web application from one of the servlet.
If I deploy my application in "www.mydomain.com" I want to get the root url like "http://www.mydomain.com".
Same thing if I deploy it in local tomcat server with 8080 port it should give "http://localhost:8080/myapp"
Can anyone tell me how to get the root URL of...
Hi. I am having this error in my j2ee web application.
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-12705: Cannot access NLS data files or invalid environment specified
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145)
oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:3...
I am from Java Desktop Application background. May I know what is the best practice in J2EE, to atomic read and write a field in database. Currently, here is what I did
// In Servlet.
synchronized(private_static_final_object)
{
int counter = read_counter_from_database();
counter = some_calculation_that_shall_be_done_outside_data...
we have a J2EE app on which we're still working. It runs on Oracle DB. and the business tier is coded with EJB 2.0 with a rich client interface.
now, the application is going to be deployed on multiple sites. and each site will be creating new items (new contracts, etc.).
what we want to realize is to duplicate all new items added to a...
my hibernate object A has object B, C, and D as properties :
A.getB().getName();
A.getC().getTitle();
now, I want to load A with all its properties without getting a LazyInitializationException.
so, I need to load A's object graph fully.
is there any generic method of retrieving an object's graph in hibernate ?
...
I'm using Weblogic 9.2 with a lot of MDBs. These MDBs access JDBC DataSources and write to both locally and externally managed JMS Destinations using local and foreign XAConnectionFactorys, respectively. Each MDB demarcates a container-managed JTA transaction that should be distributed amongst all of these resources.
Below is an excerpt...
Okay this is the problem
I have a Java application running on top of Apache Tomcat & I have this other application too with its own war file running on the same server.
Now I want to authenticate user once & pass that session to the other application.
We can say cross domain session sharing on same Apache Tomcat .. how should I go abo...
I'm rolling J2EE code that adheres to Servlet 2.5 and am wondering what the major differences are between 2.5 and 3. Pointers to official Sun docs and personal experiences most appreciated.
If I shouldn't be concerning myself with 3 for the time being, just say so. Thanks!
...
I am using Spring Web MVC and Hibernate for developing my application.
My login.jsp page has following code :
<form:form method="post" commandName="User">
User Name :
<form:input path="email"/>
Password :
<form:input path="password"/>
<input type="submit" align="center" value="Execute">
Now, My servlet.xml file ha...
In the following scenario:
1 Database
4 Web servers
How do the Web servers generate unique ID's for the database so that they are unique? Yes it's possible to use Auto-increment, but this is too easily crawled/guessed/etc. So auto-increment is currently not an option.
...
It is Hallowe'en after all.
Here's the problem: I'm maintaining some old-ish J2EE code, using Quartz, in which I'm running out of threads. jconsole tells me that there are just short of 60K threads when it goes pear-shaped, of which about 100 (!!) are actually running. Intuition and some googling (see also here) suggest that what's ha...
I'm digging into J2EE for the first time in years. I'm looking for recommendations on J2EE debugging and monitoring tools. I'd like to find a tool that lets me dynamically explore the threads space etc.
I'm primarily working with Tomcat. update: and Java 5. (Rats.)
...
We have a J2EE app built on Struts2+spring+iBatis; not all DAO's use iBatis...some code still uses the old JDBC approach of interacting with Database. All our DAO's call Stored Procedures, we do not have any inline SQL. Since Oracle Stored Procedures return cursors, we have to drastically change our code.
It is fairly easy for us to c...
Another Hibernate question... :P
Using Hibernate's Annotations framework, I have a User entity. Each User can have a collection of friends: a Collection of other Users. However, I have not been able to figure out how to create a Many-to-Many association within the User class consisting of a list of Users (using a user-friends intermedia...
I need to write a Message Driven Bean. I'm using JBoss IDE 1.5. I understand the concept behind MDB's but I don't really know how to install the JMS provider (JBoss MQ? I think) and use it so that it will be used to broker my message to an MDB.
does anyone know of a tutorial I can use ?
...
I am developing a application using J2EE and the specifications of project requires SMS based query to some information.
Any user sends a text message in predefined format.
User get a autoresponder about current information.
I heard about SMSlib but dont know if this library can give me what i want.
Advice please.
thanks
...
I've copied and pasted the example ejb-jar.xml and jboss.xml file from http://docs.jboss.org/jbossas/jboss4guide/r4/html/ch6.chapt.html#ch6.mdbejbjar.ex and I'm receiving the following error when JBoss attempts to deploy it:
ERROR [ScannerThread] deployment.MainDeployer (MainDeployer.java:943) - Could not create deployment: file:/...-ej...