pojo

Pojo to xsd generation

I was just wondering if there was a library out there which could generate a xsd schema from a java class . Google yields lots of results the opposite ( java classes from xsd ). ...

What is the difference between a JavaBean and a POJO?

I'm not sure about the difference. I'm using Hibernate and, in some books, they use JavaBean and POJO as an interchangeable term. I want to know if there is a difference, not just in the Hibernate context, but as general concepts. ...

How do I make my pojos transactional?

I have a multi-threaded, multi-server web application with hibernate and spring managing transactions with AOP. The problem is, I need to maintain in-memory data and keep it current with the state of the database...essentially I'm implementing an in-memory cache. Now, is there any way to make my in-memory pojos transactional on the same...

Scalability implications of converting stateless session beans to POJOs

Imagine a heavily-used service object that's implemented as an EJB 2.1 SLSB, and that also happens to be thread-safe in itself by virtue of having no state whatsoever. All its public methods are transactional (via CMT), most simply requiring a transaction, but some requiring a new transaction. If I convert this SLSB to a genuine singlet...

XStream or Simple

I need to decide on which one to use. My case is pretty simple. I need to convert a simple POJO/Bean to XML, and then back. Nothing special. One thing I am looking for is it should include the parent properties as well. Best would be if it can work on super type, which can be just a marker interface. If anyone can compare these two wi...

Does JBoss cache class files?

I'm wrestling with a strange problem: When I make a change to a POJO or Seam Component in my localhost JBoss instance, restart it, and load the page, the change is visible. However, on our server, running the same version of JBoss, when I stop the instance, delete the WAR file, upload the latest version, and restart JBoss, it won't show ...

Difference between DTO, VO, POJO, JavaBeans?

Have seen some similar questions here and here. Can you also please tell me the contexts in which they are used?? Or the purpose of them? ...

Java: What is the fastest way to inject fields using reflection?

Hello, everyone! Suppose, I have a lot of classes, which are constructed using Java reflection (for some reason). Now I need to post-inject values to fields, which are annotated with @PostInject. public class SomeClass { @PostInject private final String someString = null; public void someMethod() { // here, someString has a...

EJB / Resource injection references - passing to Pojo's

In JBoss 4.x, @EJB / @Resource annotations can only be used in EJBs. If you use a stateless bean or an MDB as an entry point, you can inject your resources using the annotations. However, if you have Pojo's that perform business logic and need to use these resources, they can not be injected via annotations. I am passing the reference...

MarshallingView in Spring to adjust output?

I have some POJOs which are the basis for this RESTful API I am working on. However, some of the responses I need to include some other information to make the API more complete. I really don't want to put these extra information in the POJO, but include it at the web service layer as if it were. It deals with "People" who have "Appoin...

How to package EJB3 with external domain-jar

Hello again :) I am facing another problem in my little test-webapp. I have an EJB module (created via maven-pom) that basically wraps the data-access, so all it does is some DAOs implemented as Stateless-SessionBeans. My domain-model (simple POJOs with JPA2 annotations) is located in another, simple java, project that will be packaged ...

How can I get the data from Plain Old Java Objects to Oracle BI Publisher?

I have a customer who uses Oracle BI Publisher. Today we have to write stored procedures and execute those from BI Publisher to get the data out. Similar to that we have to use DAOs to execute stored procs and get the data out. I wonder if it would be possible to integrate BI Publisher with DAOs that would get the data DIRECTLY from da...

Plain Old Objects in Ruby?

I notice in Ruby it is very common to for vendor APIs to pass back results as arrays? Shouldn't Plain Old Objects (Like POJOs in Java) be more of a standard? If I write my own library shouldn't I use POJOs POROs? ...

Up-to-date Swing MVC example + Question

Hi, I'm looking for an article or tutorial that gives an example of what an up-to-date MVC pattern (2.0?) should look like with the Swing framework. Also, being more used to a layered architecture, I'd like to know how the domain objects or POJOs fit into the picture. Am I right in assuming that they are separate and called by the mode...

JBoss5 MainDeployer MBEAN listDeployer returns empty collection

It seems that the MainDeployer MBean doesn't work/is not implemented. how to retrieve the list of deployed application in JBoss 5? ...

Variable number of arguments in an Axis2 POJO

I have a web service that I built with Axis2/Java. The web service will take in a list of objects and will process them. I'll use the following operation as an example. public class AddToDatabaseService{ public void addToDatabase(String name1, String name2, String name3, ....) { //add names to database } } I want the calle...

EJB containing POJO instance with transaction

I have created POJO facades to be used by Stateless EJBs. These POJO classes contains convenient CRUD methods using Entity beans with transactions. My persistence.xml is defined to use JTA. However my POJO classes is using manual transactions. I think that is the reason why I'm getting this error: "A JTA EntityManager cannot use getTran...

Hibernate generate POJOs with Equals

We are using hibernate in a new project where we use the hibernate.reveng.xml to create our *.hbm.xml files and POJOs after that. We want to have equals methods in each of our POJOs. I found that you can use <meta attribute="use-in-equals">true</meta> in your hbm files to mark which properties to use in the equals. But this would mean e...

POJO's versus Cursors in Android

I usually tend to define the model layer of my apps using POJO's, such as Article, Comment, etc. I was about to implement an AlphabetIndexer in the adapter of one of my ListViews. Right now this adapter accepts a Collection of Articles, which I normally get from my wrapper around an SQLiteDatabase. The signature of the AlphabetIndexer ...

Parsing JSON to XML using net.sf.json (java)

Hi guys, I'm parsing a generic JSON to a XML using net.sf.json. (I'm not using POJO Obj in the conversion) Json that I'm converting: { "root": { "accountId": "1000", "Items": [ { "cost": 0.1, "debit": 0.1 }, { "cost": 0.2, ...