I am using EJB3, JBoss AS 4.2.1 and Oracle 10g. The thing is every time i deploy to the AS the sequence is broken. Ex: when i am looking to the sequence from toad, its last value is 41 but the actual id which is set for the new entry is 1050.
Do you have any idea or a known bug about this issue.
Thanks.
...
I have a method that returns lot of data, should I use @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) for this method. The method perform a JPA query an loads the full content of a table (about 1000 rows).
...
Hi all
I'm trying to create an EJB factory class, which works like this: You have a method which takes as argument a class of an EJB, then it checks whether the EJB has a remote interface (if not throw an exception) and if it does, it returns the concerning EJB.
The code below does exactly this. However the object it returns is of the ...
Hi,
i want to use prepared statement with ejb3 to insert data in oracle. is it possible to use.
i try to find some example on net but i could not find any good example.
Please help me to use it. or is there any other way to use parameter query (as we use ? in prepared statement) in ejb3
Thanks and regards
...
I have a problem where I get a deadlock on a MS SQL Server. The same code runs without problems on MySQL.
My problem is that I receive a request to delete a job (which is attached to a device), and afterwards I receive a request to create a new job for the same device. Most times this works without any problems, but once in a while the ...
I have an ejb method executing in a REQUIRES context, that calls another ejb method with a REQUIRES_NEW context.
I suspect the second transaction is not being created/executed, however I'm not certain how to tell.
One way I've considered is to use p6spy and just log all new transaction & commit statements, however I would have expected ...
I need to create an interval Timer that is set to run once a week automatically. I don't want it to start based on user input, but I want it to be created when the application is deployed to the server. Every example that I have seen has another class starting the timer. I don't want to use a message driven bean to create the timer becau...
We have an application which has a swing client and java app on the server (jboss.4.2.1.GA) side. We are using ejb3.
In our application at some point we are successfuly creating an invoice and show it to the user but when user wants to chage the invoice we get the following error. After reloading the invoice user can be able to change t...
Hi,
We are using JDeveloper 11g.
Both a Model and ViewController project that makes use of ADF fusion and what not.
My web-xml has an ejb reference for a statfull session ejb.
I have a managedbean that's declared in faces-config.
I am trying to access a EJb from inside the managed bean.
I declare
@EJB (name ="LocationServicesEJB")
p...
I am currently trying to wrap my mind around Java EE 5. What I'd like to do is create a sample application that
offers a simple stateless EJB (e. g. a simple calulator with an add() method)
expose this add method as a webservice
consume this webservice from another EJB
The first two steps are easy and I can deploy and test this bean ...
I am working with a piece of code implementing JAAS LoginModule and in the commit method I set the principal with user UUID:
subject.getPrincipals().add(new SimplePrincipal(userUUID)
But for some reason when I access the user from EJB Context:
context.getCallerPrincipal().getName()
I receive the login name of the user instead of t...
This should be simple, but I'm at a complete loss.
I'm working through a tutorial for setting up some MBeans in JBoss 5.0. It has an example like this:
@Remote
public interface Calculator {
public double getInterestRate();
public double calculateTotalInterest(double presentValue, int years);
public double calculateFuture...
I have the following EJB class instantiated in an application running in JBoss 5
public interface ISlaveServer {
public String getId();
public String getName();
}
@Remote
public interface IMasterServer {
public String getId();
public void addSlave(ISlaveServer slaveServer);
public void removeSlave(ISlaveSe...
I need to implement a simple DAO bean, which also caches data read from the database. This DAO bean is used by stateless beans.
Because EJB3.0 doesn't support singleton beans, what would be the correct way to implement such a DAO bean? Is it ok to just use static variable to keep the cache?
We are using Oracle AS and not going to use c...
I'm hoping someone can help me - I'm using JBoss 5.1 and MQ Series 7 in an EJB / JMS based application. I have several message driven beans in my application, each listening on an MQ Series message queue. When an error is encountered during the processing of a message, I need to be able to configure a 'retry delay', so that mq series w...
Hi all.
I've managed to do some ant-script to populate my databases.. (simple script that runs some .sql files, like 'create', 'populate', 'drop', etc.)
Is there any way in hell that an ant-script can create the database itself from scratch? This is for JavaDB-Derby (from the glassfish bundle). Since it's a project for university, we f...
An example:
@Remote
public interface SomeComponentRemote{
public Something processStuff();
}
//--
@Local
public interface SomeComponentLocal extends SomeComponentRemote{
}
Is that allowed? Can i do this regularly?
...
Hello,
I would like to know how can I access the file system from an EJB 3 bean?
I searched the Internet on the subject and haven't found a good answer.
Some suggest using the java.io/java.nio even though the specification prohibits this usage. Most application servers seem to allow the access to this API anyway.
Another idea would b...
I'm going to analize some Excel files that the user has to upload in my webapp, I already have the stored procedures that works. But i have no idea how to save the uploaded file to my oracle directoy. I think there are two steps, first creating the file into the specified path. And filling tha file with the info. If somebody has made thi...
Hi all,
I have to work with a project in which it is mandatory to use JEE and EJB 3. Can anyone suggest the best development environment for development of these technologies?
And any useful links with some samples and how-tos to start with?
...