java-ee

Can Python be good alternative for web app that would otherwise be done in JEE / J2EE?

Hi, Can Python be a good alternative to a web app that would otherwise be developed with JEE / J2EE? If so, which Python web app framework(s) may be a good choice? Please see details about the app below. I've asked a few people individually about this, who have worked for a good amount of time on either or both of JEE and Python web app...

Maven ignoring provided scope

I have a EAR with a number of EJB dependencies. 2 of these have a provided scope dependency to the glassfish-embedded-all jar. However when I do a mvn install on my local machine or when the application is build through maven on hudson the ear always contains the glassfish-embedded-all jar. e.g. DataAccess-ejb with provided dependency ...

how to create GUID in java EE

hi, i want to know how to create GUID number in java ee , i am using jboss 4.2.3 ...

Servlets should not start threads due to issues that may arise when clustering ....what issues ?

I know that we should not start threads in a servlet is that threads should be managed by the container. If the container is told to shutdown if there are threads that it does not know about hanging around it wont shutdown. I take care of this by making it a daemon thread... But other than the above "unable to shutdown" situation what o...

Java EE build fail

I am new to Java EE and am working on an existing project. When I try to build the project, the build fails because the unit tests are failing. But when I run the unit tests alone, they all run fine. Is it some problem with the build settings ? It will be great if someone could help me with where to look at. Thanks a lot. ...

My ear which was build with maven does not generates its APP-INF/lib

As I said in title when i build ear the artifacts (wars and ejbs) are copied inside ear but the APP-INF/lib is missing, and i don't know what could be the reason. This is a part of pom.xml: <plugin> <artifactId>maven-ear-plugin</artifactId> <version>2.3.2</version> <configuration> ...

Error deploying ear to Glassfish

Hi, We have a EAR with 3 EJB modules. I am trying to deploy to glassfish but am hitting an error I can't explain or work out how best to identify. [#|2010-08-03T14:39:15.570+0100|INFO|glassfish3.0.1|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=28;_ThreadName=Thread-1;|[AutoDeploy] Selecting file /e...

Open source managed runtime environments (MRTE) server for Java?

Hi, all. I want to enable the users of my website to upload their Java programs as a set of jar files. Of course I want to restrict the classes they can see or use, along with the underlying machine resources such as the heap, the threads, the disk, the consumed processor, etc, etc. I want a server to manage, store and run those user ...

Looking up an EJB dynamically

I'm developing an application on Glassfish 3. I have an EJB that looks like this: @LocalBean @Stateless public class MyBean { public void doSomething() {} } My client code (running inside the same application) looks like this: MyBean mb = (MyBean) InitialContext.doLookup(MyBean.class.getName()); According to a few sources, this s...

How to inject some specific client side code in the interface of a session bean ?

My need is to hide some specific code to the client. The fact is that I have a SessionBean using RemoteInputStream. To use this SessionBean, the client needs to use the rmiio API to generate a compliant RemoteInputStream. What I want to do it something like replacing the SessionBean interface with an abstract class to include in this ...

JEE6: Switching to CDI - Best resources

I have a small yet complete JEE 6 application at hand. The traditional annotations are being used: @Resource, @EJB, @Singleton, @PostConstruct, @PreDestroy, @PersistenceContext, @ManagedBean, @ManagedProperty, @RequestScope, @ApplicationScope,... I would like to evaluate whether it makes sense to introduce CDI, and to standardize ...

Writing test code for verifying database entries when testing an API

I'm writing test code to test a client-server application. The application under test consists of an application that runs on Tomcat or another Java EE application server, and client jars that expose an API. I'm basically writing test code that uses this client API to connect to the server. In addition to extensively testing the ...

Why use @PostConstruct ?

In a managed bean, @PostConstruct is called after the regular Java object constructor. Why would I use @PostConstruct to initialize by bean, instead of the regular constructor itself? ...

JPA: When parent entity got removed, child entity still remain

Customer Entity (Parent Entity) @Entity public class Customer { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; private String name; @OneToMany(mappedBy="customer", cascade=CascadeType.ALL) private List<Facility> facilities; //Setter and Getter for name and facilities public void addFacility(Facility facility){...

How conversation scope in implemented in CDI?

It is done through some session key that holds some structure? ...

JPA: difference between @JoinColumn and @PrimaryKeyJoinColumn?

What's the exact difference between @JoinColumn and @PrimaryKeyJoinColumn? You use @JoinColumn for columns that are FKs. A typical column could look like (e.g. in a join table with additional attributes): @ManyToOne @JoinColumn(name = "...") private OtherClass oc; What happens if I promote the column to be a/the PK, too (a.k.a. ident...

JSF2 Form Authentication whit database users

I'm currently using JSF 2 and icefaces framework for javascript I'm having some problems with j_security_check based on the url(that's not the point), that my taste is very strict my question is: Is there any better way of authentication, or some alternative? I find JAAS, but did not convince me because because the users are stored in ...

Testing against Java EE 6 API

I write an addition to JAX-RS and included the Java EE 6 API as a Maven dependency. <dependency> <groupId>javax</groupId> <artifactId>javaee-api</artifactId> <version>6.0</version> <scope>provided</scope> </dependency> Then I have a little test case: @Test public void testIsWriteable() { class SpecialViewable...

throw new RuntimeException("Compiled Code")?

I've just looked into the code of javax.ws.rs.core.MediaType and wondered about throw new RuntimeException("Compiled Code"), since I've never seen that before. I think is a form of "not implemented", but don't know. package javax.ws.rs.core; import java.util.Map; import javax.ws.rs.ext.RuntimeDelegate.HeaderDelegate; public class Med...

Looking for project suggestions

Please suggest a topic for my final year project. I'm in B.E. (IT). I want to develop it in J2EE. ...