Click here to Skip to main content
15,884,836 members
Articles / Containers / Virtual Machine

.NET/Java Interoperability using Service Interface and DTO Architecture Patterns

Rate me:
Please Sign up or sign in to vote.
4.73/5 (8 votes)
7 Feb 2011CPOL5 min read 49.4K   234   15  
This article shows you how to build a simple cross-platform interoperation solution between .NET and Java using the Service Interface and Data Transfer Object (DTO) architecture patterns
package fulfillmentCenter;

import java.io.File;
import com.db4o.Db4oEmbedded;
import com.db4o.ObjectContainer;

public class PersistanceManager {
    
	private static ObjectContainer _container = null;
    
	public static ObjectContainer getContainer()
	{
		synchronized (PersistanceManager.class) {
			if(_container == null)
			{
		        String curDir = System.getProperty("user.dir");
		        _container = Db4oEmbedded.openFile(curDir + File.separator +  "FulfillmentCenter.dbo");
			}
		}
		return _container;
	}

}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Architect Cisco
United States United States
I work as a senior solutions software architect at Cisco.

Here is my work.

Comments and Discussions